mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Factor runFresh out of evaluating.
This commit is contained in:
parent
ce8069d7f6
commit
e972abd2e3
@ -19,8 +19,7 @@ deriving instance (Show (Cell address value), Show address, Show value) => Show
|
||||
|
||||
|
||||
evaluating :: Evaluator address value
|
||||
( Fresh
|
||||
': State (Heap address (Cell address) value)
|
||||
( State (Heap address (Cell address) value)
|
||||
': State (ModuleTable (Maybe (address, Environment address)))
|
||||
': effects) result
|
||||
-> Evaluator address value effects (result, EvaluatingState address value)
|
||||
@ -28,4 +27,3 @@ evaluating
|
||||
= fmap (\ ((result, heap), modules) -> (result, EvaluatingState heap modules))
|
||||
. runState lowerBound -- State (ModuleTable (Maybe (address, Environment address)))
|
||||
. runState lowerBound -- State (Heap address (Cell address) value)
|
||||
. runFresh 0
|
||||
|
@ -61,6 +61,7 @@ runGraph graphType includePackages project
|
||||
runGraphAnalysis
|
||||
= run
|
||||
. evaluating
|
||||
. runFresh 0
|
||||
. runIgnoringTrace
|
||||
. resumingLoadError
|
||||
. resumingUnspecialized
|
||||
|
@ -30,6 +30,7 @@ import Text.Show.Pretty (ppShow)
|
||||
justEvaluating
|
||||
= runM
|
||||
. evaluating
|
||||
. runFresh 0
|
||||
. runPrintingTrace
|
||||
. fmap reassociate
|
||||
. runLoadError
|
||||
@ -68,6 +69,7 @@ newtype UtilEff address a = UtilEff
|
||||
checking
|
||||
= runM @_ @IO
|
||||
. evaluating
|
||||
. runFresh 0
|
||||
. runPrintingTrace
|
||||
. runTermEvaluator @_ @Monovariant @Type
|
||||
. caching @[]
|
||||
|
@ -31,6 +31,7 @@ spec = parallel $ do
|
||||
evaluate
|
||||
= runM
|
||||
. evaluating @Precise @Val
|
||||
. runFresh 0
|
||||
. runReader (PackageInfo (name "test") Nothing mempty)
|
||||
. runReader (ModuleInfo "test/Control/Abstract/Evaluator/Spec.hs")
|
||||
. fmap reassociate
|
||||
|
@ -113,6 +113,7 @@ testEvaluating
|
||||
= run
|
||||
. runReturningTrace
|
||||
. evaluating
|
||||
. runFresh 0
|
||||
. fmap reassociate
|
||||
. runLoadError
|
||||
. runUnspecialized
|
||||
|
Loading…
Reference in New Issue
Block a user