mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Generalize typecheckingFlowInsensitive over the term type.
This commit is contained in:
parent
813cde359e
commit
e2875572b9
@ -17,7 +17,6 @@ import Control.Effect.Reader hiding (Local)
|
||||
import Control.Effect.State
|
||||
import Control.Monad ((>=>), unless)
|
||||
import Control.Monad.Module
|
||||
import qualified Data.Core as Core
|
||||
import Data.File
|
||||
import Data.Foldable (for_)
|
||||
import Data.Function (fix)
|
||||
@ -90,11 +89,18 @@ generalize ty = fromJust (closed (forAlls (IntSet.toList (mvs ty)) (hoistTerm R
|
||||
|
||||
|
||||
typecheckingFlowInsensitive
|
||||
:: [File (Term (Core.Ann :+: Core.Core) User)]
|
||||
:: Ord (term User)
|
||||
=> (forall sig m
|
||||
. (Carrier sig m, Member (Reader Loc) sig, MonadFail m)
|
||||
=> Analysis term User Type m
|
||||
-> (term User -> m Type)
|
||||
-> (term User -> m Type)
|
||||
)
|
||||
-> [File (term User)]
|
||||
-> ( Heap User Type
|
||||
, [File (Either (Loc, String) (Term (Polytype :+: Monotype) Void))]
|
||||
)
|
||||
typecheckingFlowInsensitive
|
||||
typecheckingFlowInsensitive eval
|
||||
= run
|
||||
. runFresh
|
||||
. runHeap "__semantic_root"
|
||||
|
Loading…
Reference in New Issue
Block a user