From 58f560e4a2549bede624f0c8df29e66e108a9f6d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 2 Aug 2018 10:21:28 -0400 Subject: [PATCH] Only pass a proxy to callGraphRubyProject. --- src/Semantic/Util.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index e54671113..1c6219150 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -105,14 +105,14 @@ evalTypeScriptProject = justEvaluating <=< evaluateProject (Proxy :: Proxy 'Lang typecheckGoFile = checking <=< evaluateProjectWithCaching (Proxy :: Proxy 'Language.Go) goParser Language.Go -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 []) +callGraphProject parser proxy opts paths = runTaskWithOptions opts $ do + blobs <- catMaybes <$> traverse readFile (flip File (Language.reflect proxy) <$> paths) + package <- parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs (Language.reflect proxy) []) modules <- topologicalSort <$> runImportGraphToModules proxy package x <- runCallGraph proxy False modules package pure (x, (() <$) <$> modules) -callGraphRubyProject = callGraphProject rubyParser (Proxy @'Language.Ruby) Language.Ruby debugOptions +callGraphRubyProject = callGraphProject rubyParser (Proxy @'Language.Ruby) debugOptions -- Evaluate a project consisting of the listed paths. evaluateProject proxy parser lang paths = withOptions debugOptions $ \ config logger statter ->