From 2599cfa60d96ca98ba76c59962d5faf052efcf24 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 10 Dec 2018 11:55:17 -0500 Subject: [PATCH] Move the do block up. --- src/Semantic/Analysis.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Semantic/Analysis.hs b/src/Semantic/Analysis.hs index fd9702fc7..b344ac586 100644 --- a/src/Semantic/Analysis.hs +++ b/src/Semantic/Analysis.hs @@ -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. 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) - -- after setting up the scope and frame for a module. - raiseHandler (runReader (moduleInfo m)) . runAllocator $ do + -- Run the allocator and Reader ModuleInfo effects (Some allocator instances depend on Reader ModuleInfo) + -- after setting up the scope and frame for a module. + evalModule parentScope parentFrame m = raiseHandler (runReader (moduleInfo m)) . runAllocator $ do let (scopeEdges, frameLinks) = case (parentScope, parentFrame) of (Just parentScope, Just parentFrame) -> (Map.singleton Lexical [ parentScope ], Map.singleton Lexical (Map.singleton parentScope parentFrame)) _ -> mempty