From c1c71e2de94bb8ec82fa0ad346913e8f38d70921 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 24 Jul 2018 11:01:07 -0700 Subject: [PATCH] Fix up util --- src/Semantic/Util.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index 2d7f4d612..f467af8a4 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -106,7 +106,7 @@ typecheckGoFile = checking <=< evaluateProjectWithCaching (Proxy :: Proxy 'Langu callGraphProject parser proxy lang opts paths = runTaskWithOptions opts $ do blobs <- catMaybes <$> traverse readFile (flip File lang <$> paths) package <- parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs lang []) - modules <- topologicalSort <$> runImportGraph proxy package + modules <- topologicalSort <$> runImportGraphToModules proxy package x <- runCallGraph proxy False modules package pure (x, (() <$) <$> modules) @@ -121,7 +121,7 @@ data TaskConfig = TaskConfig Config LogQueue StatQueue evaluateProject' (TaskConfig config logger statter) proxy parser lang paths = either (die . displayException) pure <=< runTaskWithConfig config logger statter $ do blobs <- catMaybes <$> traverse readFile (flip File lang <$> paths) package <- fmap quieterm <$> parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs lang []) - modules <- topologicalSort <$> runImportGraph proxy package + modules <- topologicalSort <$> runImportGraphToModules proxy package trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules) pure (runTermEvaluator @_ @_ @(Value Precise (UtilEff Precise)) (runReader (packageInfo package) @@ -134,7 +134,7 @@ evaluateProject' (TaskConfig config logger statter) proxy parser lang paths = ei evaluateProjectWithCaching proxy parser lang path = runTaskWithOptions debugOptions $ do project <- readProject Nothing path lang [] package <- fmap quieterm <$> parsePackage parser project - modules <- topologicalSort <$> runImportGraph proxy package + modules <- topologicalSort <$> runImportGraphToModules proxy package pure (runReader (packageInfo package) (runReader (lowerBound @Span) (runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Monovariant)))))