1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00

🔥 graphingLoadErrors.

This commit is contained in:
Rob Rix 2018-05-22 14:13:51 -04:00
parent cb264f5d36
commit 577e5e4ace

View File

@ -8,7 +8,6 @@ module Analysis.Abstract.Graph
, moduleInclusion
, packageInclusion
, graphingTerms
, graphingLoadErrors
, graphingPackages
, graphingModules
, graphing
@ -17,7 +16,6 @@ module Analysis.Abstract.Graph
import Algebra.Graph.Export.Dot hiding (vertexName)
import Control.Abstract
import Data.Abstract.Address
import Data.Abstract.Evaluatable (LoadError (..))
import Data.Abstract.FreeVariables
import Data.Abstract.Module (Module(moduleInfo), ModuleInfo(..))
import Data.Abstract.Package (PackageInfo(..))
@ -71,15 +69,6 @@ graphingTerms recur term@(In _ syntax) = do
_ -> pure ()
recur term
-- | Add vertices to the graph for 'LoadError's.
graphingLoadErrors :: Members '[ Reader ModuleInfo
, Resumable (LoadError location value)
, State (Graph Vertex)
] effects
=> SubtermAlgebra (Base term) term (TermEvaluator term location value effects a)
-> SubtermAlgebra (Base term) term (TermEvaluator term location value effects a)
graphingLoadErrors recur term = TermEvaluator (runTermEvaluator (recur term) `resumeLoadError` (\ (ModuleNotFound name) -> moduleInclusion (Module (BC.pack name)) *> moduleNotFound name))
graphingPackages :: Members '[ Reader ModuleInfo
, Reader PackageInfo
, State (Graph Vertex)