mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Provide the Reader Span effect in evaluatePackageWith.
This commit is contained in:
parent
2301932f4f
commit
e7a9fcde3f
@ -180,7 +180,7 @@ evaluatePackageWith :: forall location term value inner inner' outer
|
||||
] outer
|
||||
, Recursive term
|
||||
, inner ~ (Goto inner' value ': inner')
|
||||
, inner' ~ (LoopControl value ': Return value ': Reader ModuleInfo ': Modules location value ': Reader PackageInfo ': outer)
|
||||
, inner' ~ (LoopControl value ': Return value ': Reader ModuleInfo ': Modules location value ': Reader Span ': Reader PackageInfo ': outer)
|
||||
)
|
||||
=> (SubtermAlgebra Module term (Evaluator location value inner value) -> SubtermAlgebra Module term (Evaluator location value inner value))
|
||||
-> (SubtermAlgebra (Base term) term (Evaluator location value inner value) -> SubtermAlgebra (Base term) term (Evaluator location value inner value))
|
||||
@ -188,6 +188,7 @@ evaluatePackageWith :: forall location term value inner inner' outer
|
||||
-> Evaluator location value outer [value]
|
||||
evaluatePackageWith analyzeModule analyzeTerm package
|
||||
= runReader (packageInfo package)
|
||||
. runReader lowerBound
|
||||
. runReader (packageModules (packageBody package))
|
||||
. runModules evalModule
|
||||
. withPrelude (packagePrelude (packageBody package))
|
||||
@ -205,7 +206,7 @@ evaluatePackageWith analyzeModule analyzeTerm package
|
||||
. fmap fst
|
||||
. runGoto lowerBound
|
||||
|
||||
evaluateEntryPoint :: ModulePath -> Maybe Name -> Evaluator location value (Modules location value ': Reader PackageInfo ': outer) value
|
||||
evaluateEntryPoint :: ModulePath -> Maybe Name -> Evaluator location value (Modules location value ': Reader Span ': Reader PackageInfo ': outer) value
|
||||
evaluateEntryPoint m sym = runInModule (ModuleInfo m) $ do
|
||||
v <- maybe unit (pure . snd) <$> require m
|
||||
maybe v ((`call` []) <=< variable) sym
|
||||
|
@ -47,7 +47,6 @@ graph graphType renderer project
|
||||
runGraphAnalysis
|
||||
= run
|
||||
. evaluating
|
||||
. runReader (lowerBound :: Span)
|
||||
. runIgnoringTraces
|
||||
. resumingLoadError
|
||||
. resumingUnspecialized
|
||||
|
@ -14,7 +14,6 @@ import Data.Abstract.Type
|
||||
import Data.Blob
|
||||
import Data.File
|
||||
import qualified Data.Language as Language
|
||||
import Data.Semilattice.Lower
|
||||
import qualified GHC.TypeLits as TypeLevel
|
||||
import Language.Preluded
|
||||
import Parsing.Parser
|
||||
@ -30,7 +29,6 @@ justEvaluating
|
||||
= runM
|
||||
. fmap (first reassociate)
|
||||
. evaluating
|
||||
. runReader (lowerBound :: Span)
|
||||
. runPrintingTraces
|
||||
. runLoadError
|
||||
. runValueError
|
||||
@ -44,7 +42,6 @@ justEvaluating
|
||||
evaluatingWithHoles
|
||||
= runM
|
||||
. evaluating
|
||||
. runReader (lowerBound :: Span)
|
||||
. runPrintingTraces
|
||||
. resumingLoadError
|
||||
. resumingUnspecialized
|
||||
@ -60,7 +57,6 @@ checking
|
||||
= runM
|
||||
. fmap (first reassociate)
|
||||
. evaluating
|
||||
. runReader (lowerBound :: Span)
|
||||
. runPrintingTraces
|
||||
. providingLiveSet
|
||||
. runLoadError
|
||||
|
Loading…
Reference in New Issue
Block a user