mirror of
https://github.com/github/semantic.git
synced 2024-12-28 09:21:35 +03:00
🔥 the environment from EvaluatingState.
This commit is contained in:
parent
66594cf631
commit
a6025262c5
@ -10,8 +10,7 @@ import Data.Semilattice.Lower
|
|||||||
|
|
||||||
-- | An analysis evaluating @term@s to @value@s with a list of @effects@ using 'Evaluatable', and producing incremental results of type @a@.
|
-- | An analysis evaluating @term@s to @value@s with a list of @effects@ using 'Evaluatable', and producing incremental results of type @a@.
|
||||||
data EvaluatingState address value = EvaluatingState
|
data EvaluatingState address value = EvaluatingState
|
||||||
{ environment :: Environment address
|
{ heap :: Heap address (Cell address) value
|
||||||
, heap :: Heap address (Cell address) value
|
|
||||||
, modules :: ModuleTable (Maybe (Environment address, value))
|
, modules :: ModuleTable (Maybe (Environment address, value))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,15 +22,13 @@ deriving instance (Show (Cell address value), Show address, Show value) => Show
|
|||||||
evaluating :: Evaluator address value
|
evaluating :: Evaluator address value
|
||||||
( Fail
|
( Fail
|
||||||
': Fresh
|
': Fresh
|
||||||
': State (Environment address)
|
|
||||||
': State (Heap address (Cell address) value)
|
': State (Heap address (Cell address) value)
|
||||||
': State (ModuleTable (Maybe (Environment address, value)))
|
': State (ModuleTable (Maybe (Environment address, value)))
|
||||||
': effects) result
|
': effects) result
|
||||||
-> Evaluator address value effects (Either String result, EvaluatingState address value)
|
-> Evaluator address value effects (Either String result, EvaluatingState address value)
|
||||||
evaluating
|
evaluating
|
||||||
= fmap (\ (((result, env), heap), modules) -> (result, EvaluatingState env heap modules))
|
= fmap (\ ((result, heap), modules) -> (result, EvaluatingState heap modules))
|
||||||
. runState lowerBound -- State (ModuleTable (Maybe (Environment address, value)))
|
. runState lowerBound -- State (ModuleTable (Maybe (Environment address, value)))
|
||||||
. runState lowerBound -- State (Heap address (Cell address) value)
|
. runState lowerBound -- State (Heap address (Cell address) value)
|
||||||
. runState lowerBound -- State (Environment address)
|
|
||||||
. runFresh 0
|
. runFresh 0
|
||||||
. runFail
|
. runFail
|
||||||
|
Loading…
Reference in New Issue
Block a user