1
1
mirror of https://github.com/github/semantic.git synced 2024-12-14 08:25:32 +03:00

Factor perModule into runInModule.

This commit is contained in:
Rob Rix 2018-12-11 13:41:52 -05:00
parent 45c3f828d3
commit 63a5bf4b25

View File

@ -95,7 +95,7 @@ evaluate lang perModule runTerm modules = do
_ -> mempty
scopeAddress <- newScope scopeEdges
frameAddress <- newFrame scopeAddress frameLinks
val <- runInModule scopeAddress frameAddress (perModule (runValueEffects . moduleBody) m)
val <- runInModule scopeAddress frameAddress m
pure ((scopeAddress, frameAddress), val)
where runInModule scopeAddress frameAddress
= runDeref
@ -103,6 +103,7 @@ evaluate lang perModule runTerm modules = do
. raiseHandler (runReader (CurrentScope scopeAddress))
. runReturn
. runLoopControl
. perModule (runValueEffects . moduleBody)
runValueEffects = raiseHandler runInterpose . runBoolean . runWhile . runFunction runTerm . either ((unit <$) . definePrelude) runTerm