mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Change the kind of the term field to *.
This commit is contained in:
parent
8b8a33071e
commit
b92611458e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user