diff --git a/src/Analysis/Abstract/Caching.hs b/src/Analysis/Abstract/Caching.hs index 02fd92a44..85d82db2a 100644 --- a/src/Analysis/Abstract/Caching.hs +++ b/src/Analysis/Abstract/Caching.hs @@ -7,7 +7,7 @@ module Analysis.Abstract.Caching import Control.Abstract import Data.Abstract.Cache -import Data.Abstract.ErrorContext hiding (moduleInfo) +import Data.Abstract.ErrorContext import Data.Abstract.Module import Data.Abstract.Ref import Prologue diff --git a/src/Analysis/Abstract/Graph.hs b/src/Analysis/Abstract/Graph.hs index 27c572392..f44937c7b 100644 --- a/src/Analysis/Abstract/Graph.hs +++ b/src/Analysis/Abstract/Graph.hs @@ -19,7 +19,7 @@ module Analysis.Abstract.Graph import Algebra.Graph.Export.Dot hiding (vertexName) import Control.Abstract hiding (Function(..)) import Data.Abstract.Address -import Data.Abstract.ErrorContext hiding (moduleInfo) +import Data.Abstract.ErrorContext import Data.Abstract.Ref import Data.Abstract.Declarations import Data.Abstract.Module (Module (moduleInfo), ModuleInfo (..)) diff --git a/src/Control/Abstract/Context.hs b/src/Control/Abstract/Context.hs index b8967c69a..bf1184697 100644 --- a/src/Control/Abstract/Context.hs +++ b/src/Control/Abstract/Context.hs @@ -8,14 +8,11 @@ module Control.Abstract.Context , Span , currentSpan , withCurrentSpan -, ErrorContext -, currentErrorContext , withCurrentCallStack ) where import Control.Monad.Effect import Control.Monad.Effect.Reader -import Data.Abstract.ErrorContext import Data.Abstract.Module import Data.Abstract.Package import Data.Span @@ -51,9 +48,6 @@ withCurrentSpan = local . const withCurrentSrcLoc :: (Effectful m, Member (Reader ModuleInfo) effects, Member (Reader Span) effects) => SrcLoc -> m effects a -> m effects a withCurrentSrcLoc loc = withCurrentModule (moduleInfoFromSrcLoc loc) . withCurrentSpan (spanFromSrcLoc loc) -currentErrorContext :: ( Monad (m effects), Effectful m, Member (Reader ModuleInfo) effects, Member (Reader Span) effects) => m effects ErrorContext -currentErrorContext = ErrorContext <$> currentModule <*> currentSpan - -- | Run an action with locally replaced 'ModuleInfo' & 'Span' derived from the Haskell call stack. -- -- This is suitable for contextualizing builtins & other functionality intended for use from client code but defined in Haskell source.