1
1
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:
Rob Rix 2018-06-20 12:17:46 -04:00
parent ce8069d7f6
commit e972abd2e3
5 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -61,6 +61,7 @@ runGraph graphType includePackages project
runGraphAnalysis
= run
. evaluating
. runFresh 0
. runIgnoringTrace
. resumingLoadError
. resumingUnspecialized

View File

@ -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 @[]

View File

@ -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

View File

@ -113,6 +113,7 @@ testEvaluating
= run
. runReturningTrace
. evaluating
. runFresh 0
. fmap reassociate
. runLoadError
. runUnspecialized