1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 05:11:44 +03:00

Move resumingBadModuleResolutions into Semantic.Graph.

This commit is contained in:
Rob Rix 2018-05-06 16:53:00 -04:00
parent a47b4cb6f3
commit 7c028b53eb
2 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,6 @@
module Semantic.Graph where
import Analysis.Abstract.BadAddresses
import Analysis.Abstract.BadModuleResolutions
import Analysis.Abstract.BadSyntax
import Analysis.Abstract.BadValues
import Analysis.Abstract.BadVariables
@ -92,10 +91,15 @@ importGraphAnalysis
. resumingBadSyntax
. resumingBadValues
. resumingBadVariables
. resumingBadModuleResolutions
. resumingResolutionErrors
. resumingBadAddresses
. importGraphing
resumingResolutionErrors :: (Applicative (m effects), Effectful m) => m (Resumable ResolutionError ': effects) a -> m effects a
resumingResolutionErrors = runResolutionErrorWith (\ err -> traceM ("ResolutionError:" <> show err) *> case err of
NotFoundError nameToResolve _ _ -> pure nameToResolve
GoImportError pathToResolve -> pure [pathToResolve])
-- | Render the import graph for a given 'Package'.
graphImports :: ( Show ann
, Apply Declarations1 syntax

View File

@ -3,7 +3,6 @@
module Semantic.Util where
import Analysis.Abstract.BadAddresses
import Analysis.Abstract.BadModuleResolutions
import Analysis.Abstract.BadSyntax
import Analysis.Abstract.BadValues
import Analysis.Abstract.BadVariables
@ -46,7 +45,7 @@ evaluatingWithHoles
. resumingBadSyntax @(Value Precise)
. resumingBadValues @(Value Precise)
. resumingBadVariables @(Value Precise)
. resumingBadModuleResolutions
. resumingResolutionErrors
. resumingBadAddresses @(Value Precise)
-- The order is significant here: caching has to run before typeChecking, or else well nondeterministically produce TypeErrors as part of the result set. While this is probably actually correct, it will require us to have an Ord instance for TypeError, which we dont have yet.