1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

No longer needed

This commit is contained in:
Rick Winfrey 2018-08-07 16:44:42 -07:00
parent fdd6ea9344
commit f1ad72e4fc
3 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -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 (..))

View File

@ -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.