1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Change the kind of the term field to *.

This commit is contained in:
Rob Rix 2019-07-29 12:30:38 -04:00
parent 8b8a33071e
commit b92611458e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
4 changed files with 24 additions and 24 deletions

View File

@ -96,7 +96,7 @@ concreteAnalysis :: ( Carrier sig m
, Member (State Heap) sig
, MonadFail m
)
=> Analysis (Term (Core.Ann :+: Core.Core)) Precise Concrete m
=> Analysis (Term (Core.Ann :+: Core.Core) User) Precise Concrete m
concreteAnalysis = Analysis{..}
where alloc _ = fresh
bind name addr m = local (Map.insert name addr) m

View File

@ -33,7 +33,7 @@ eval :: ( Carrier sig m
, MonadFail m
, Semigroup value
)
=> Analysis (Term (Ann :+: Core)) address value m
=> Analysis (Term (Ann :+: Core) User) address value m
-> (Term (Ann :+: Core) User -> m value)
-> (Term (Ann :+: Core) User -> m value)
eval Analysis{..} eval = \case
@ -217,8 +217,8 @@ data Analysis term address value m = Analysis
, lookupEnv :: User -> m (Maybe address)
, deref :: address -> m (Maybe value)
, assign :: address -> value -> m ()
, abstract :: (term User -> m value) -> User -> term User -> m value
, apply :: (term User -> m value) -> value -> value -> m value
, abstract :: (term -> m value) -> User -> term -> m value
, apply :: (term -> m value) -> value -> value -> m value
, unit :: m value
, bool :: Bool -> m value
, asBool :: value -> m Bool

View File

@ -65,18 +65,18 @@ runFile
:: ( Carrier sig m
, Effect sig
, Member Fresh sig
, Member (State (Heap User (Value (term User)))) sig
, Ord (term User)
, Show (term User)
, Member (State (Heap User (Value term))) sig
, Ord term
, Show term
)
=> (forall sig m
. (Carrier sig m, Member (Reader Loc) sig, MonadFail m)
=> Analysis term User (Value (term User)) m
-> (term User -> m (Value (term User)))
-> (term User -> m (Value (term User)))
=> Analysis term User (Value term) m
-> (term -> m (Value term))
-> (term -> m (Value term))
)
-> File (term User)
-> m (File (Either (Loc, String) (Value (term User))))
-> File term
-> m (File (Either (Loc, String) (Value term)))
runFile eval file = traverse run file
where run = runReader (fileLoc file)
. runFailWithLoc
@ -87,12 +87,12 @@ runFile eval file = traverse run file
importGraphAnalysis :: ( Alternative m
, Carrier sig m
, Member (Reader Loc) sig
, Member (State (Heap User (Value (term User)))) sig
, Member (State (Heap User (Value term))) sig
, MonadFail m
, Ord (term User)
, Show (term User)
, Ord term
, Show term
)
=> Analysis term User (Value (term User)) m
=> Analysis term User (Value term) m
importGraphAnalysis = Analysis{..}
where alloc = pure
bind _ _ m = m

View File

@ -89,14 +89,14 @@ generalize ty = fromJust (closed (forAlls (IntSet.toList (mvs ty)) (hoistTerm R
typecheckingFlowInsensitive
:: Ord (term User)
:: Ord term
=> (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)
-> (term -> m Type)
-> (term -> m Type)
)
-> [File (term User)]
-> [File term]
-> ( Heap User Type
, [File (Either (Loc, String) (Term (Polytype :+: Monotype) Void))]
)
@ -112,15 +112,15 @@ runFile
, Effect sig
, Member Fresh sig
, Member (State (Heap User Type)) sig
, Ord (term User)
, Ord term
)
=> (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)
-> (term -> m Type)
-> (term -> m Type)
)
-> File (term User)
-> File term
-> m (File (Either (Loc, String) Type))
runFile eval file = traverse run file
where run