mirror of
https://github.com/github/semantic.git
synced 2024-12-18 12:21:57 +03:00
Move the Reader effects to the head of UtilEff.
This commit is contained in:
parent
bb021d404a
commit
4d08e47cf0
@ -100,10 +100,10 @@ repl proxy parser paths = defaultConfig debugOptions >>= \ config -> runM . runD
|
||||
. runResolutionError
|
||||
. runAddressError
|
||||
. runValueError
|
||||
. runReader (packageInfo package)
|
||||
. runReader (lowerBound @Span)
|
||||
. runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
||||
. raiseHandler (runModules (ModuleTable.modulePaths (packageModules (snd <$> package))))
|
||||
. runReader (packageInfo package)
|
||||
. runReader (lowerBound @Span)
|
||||
$ evaluate proxy id (withTermSpans . step (fmap (\ (x:|_) -> moduleBody x) <$> ModuleTable.toPairs (packageModules (fst <$> package)))) (Precise.runAllocator . Precise.runDeref) (Concrete.runFunction coerce coerce) modules
|
||||
|
||||
-- TODO: REPL for typechecking/abstract semantics
|
||||
|
@ -56,10 +56,10 @@ justEvaluating
|
||||
newtype UtilEff address rest a = UtilEff
|
||||
{ runUtilEff :: Eff ( ValueEffects address (Value address (UtilEff address rest))
|
||||
( ModuleEffects address (Value address (UtilEff address rest))
|
||||
( Modules address
|
||||
': Reader (ModuleTable (NonEmpty (Module (ModuleResult address))))
|
||||
': Reader Span
|
||||
( Reader Span
|
||||
': Reader PackageInfo
|
||||
': Modules address
|
||||
': Reader (ModuleTable (NonEmpty (Module (ModuleResult address))))
|
||||
': Resumable (BaseError (ValueError address (UtilEff address rest)))
|
||||
': Resumable (BaseError (AddressError address (Value address (UtilEff address rest))))
|
||||
': Resumable (BaseError ResolutionError)
|
||||
@ -121,10 +121,10 @@ evaluateProject' (TaskConfig config logger statter) proxy parser paths = either
|
||||
modules <- topologicalSort <$> runImportGraphToModules proxy package
|
||||
trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules)
|
||||
pure (runTermEvaluator @_ @_ @(Value Precise (UtilEff Precise _))
|
||||
(runReader (packageInfo package)
|
||||
(runReader (lowerBound @Span)
|
||||
(runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
||||
(raiseHandler (runModules (ModuleTable.modulePaths (packageModules package)))
|
||||
(runReader (packageInfo package)
|
||||
(runReader (lowerBound @Span)
|
||||
(evaluate proxy id withTermSpans (Precise.runAllocator . Precise.runDeref) (Concrete.runFunction coerce coerce) modules))))))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user