From f5456654033280e2ad710cb6b2fa178e90ba3d53 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 23 Oct 2018 12:00:40 -0400 Subject: [PATCH] Run the module table effect with the helper. --- src/Semantic/Graph.hs | 1 + src/Semantic/Util.hs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Semantic/Graph.hs b/src/Semantic/Graph.hs index bd0cfbab7..7fcaa1702 100644 --- a/src/Semantic/Graph.hs +++ b/src/Semantic/Graph.hs @@ -10,6 +10,7 @@ module Semantic.Graph , ControlFlowVertex , style , runHeap +, runModuleTable , parsePackage , parsePythonPackage , withTermSpans diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index 5798ccc6f..e82602853 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -97,7 +97,7 @@ evaluateProject' (TaskConfig config logger statter) proxy parser paths = either modules <- topologicalSort <$> runImportGraphToModules proxy package trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules) pure (id @(Evaluator _ Precise (Value _ Precise) _ _) - (runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise))))) + (runModuleTable (runModules (ModuleTable.modulePaths (packageModules package)) (runReader (packageInfo package) (runState (lowerBound @Span) @@ -110,7 +110,7 @@ evaluatePythonProjects proxy parser lang path = runTaskWithOptions debugOptions modules <- topologicalSort <$> runImportGraphToModules proxy package trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules) pure (id @(Evaluator _ Precise (Value _ Precise) _ _) - (runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise))))) + (runModuleTable (runModules (ModuleTable.modulePaths (packageModules package)) (runReader (packageInfo package) (runState (lowerBound @Span) @@ -125,7 +125,7 @@ evaluateProjectWithCaching proxy parser path = runTaskWithOptions debugOptions $ pure (runReader (packageInfo package) (runState (lowerBound @Span) (runReader (lowerBound @Span) - (runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Monovariant))))) + (runModuleTable (runModules (ModuleTable.modulePaths (packageModules package)) (evaluate proxy id withTermSpans modules))))))