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

Move the do block up.

This commit is contained in:
Rob Rix 2018-12-10 11:55:17 -05:00
parent 96949fd9fb
commit 2599cfa60d

View File

@ -88,10 +88,9 @@ evaluate lang perModule runTerm modules = do
-- FIXME: this should be some sort of Monoidal insert à la the Heap to accommodate multiple Go files being part of the same module. -- FIXME: this should be some sort of Monoidal insert à la the Heap to accommodate multiple Go files being part of the same module.
local (ModuleTable.insert (modulePath (moduleInfo m)) ((evaluated <$ m) :| [])) rest local (ModuleTable.insert (modulePath (moduleInfo m)) ((evaluated <$ m) :| [])) rest
evalModule parentScope parentFrame m = -- Run the allocator and Reader ModuleInfo effects (Some allocator instances depend on Reader ModuleInfo)
-- Run the allocator and Reader ModuleInfo effects (Some allocator instances depend on Reader ModuleInfo) -- after setting up the scope and frame for a module.
-- after setting up the scope and frame for a module. evalModule parentScope parentFrame m = raiseHandler (runReader (moduleInfo m)) . runAllocator $ do
raiseHandler (runReader (moduleInfo m)) . runAllocator $ do
let (scopeEdges, frameLinks) = case (parentScope, parentFrame) of let (scopeEdges, frameLinks) = case (parentScope, parentFrame) of
(Just parentScope, Just parentFrame) -> (Map.singleton Lexical [ parentScope ], Map.singleton Lexical (Map.singleton parentScope parentFrame)) (Just parentScope, Just parentFrame) -> (Map.singleton Lexical [ parentScope ], Map.singleton Lexical (Map.singleton parentScope parentFrame))
_ -> mempty _ -> mempty