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

View File

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

View File

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

View File

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