mirror of
https://github.com/github/semantic.git
synced 2024-12-19 04:41:47 +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
|
. runResolutionError
|
||||||
. runAddressError
|
. runAddressError
|
||||||
. runValueError
|
. runValueError
|
||||||
. runReader (packageInfo package)
|
|
||||||
. runReader (lowerBound @Span)
|
|
||||||
. runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
. runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
||||||
. raiseHandler (runModules (ModuleTable.modulePaths (packageModules (snd <$> package))))
|
. 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
|
$ 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
|
-- TODO: REPL for typechecking/abstract semantics
|
||||||
|
@ -56,10 +56,10 @@ justEvaluating
|
|||||||
newtype UtilEff address rest a = UtilEff
|
newtype UtilEff address rest a = UtilEff
|
||||||
{ runUtilEff :: Eff ( ValueEffects address (Value address (UtilEff address rest))
|
{ runUtilEff :: Eff ( ValueEffects address (Value address (UtilEff address rest))
|
||||||
( ModuleEffects address (Value address (UtilEff address rest))
|
( ModuleEffects address (Value address (UtilEff address rest))
|
||||||
( Modules address
|
( Reader Span
|
||||||
': Reader (ModuleTable (NonEmpty (Module (ModuleResult address))))
|
|
||||||
': Reader Span
|
|
||||||
': Reader PackageInfo
|
': Reader PackageInfo
|
||||||
|
': Modules address
|
||||||
|
': Reader (ModuleTable (NonEmpty (Module (ModuleResult address))))
|
||||||
': Resumable (BaseError (ValueError address (UtilEff address rest)))
|
': Resumable (BaseError (ValueError address (UtilEff address rest)))
|
||||||
': Resumable (BaseError (AddressError address (Value address (UtilEff address rest))))
|
': Resumable (BaseError (AddressError address (Value address (UtilEff address rest))))
|
||||||
': Resumable (BaseError ResolutionError)
|
': Resumable (BaseError ResolutionError)
|
||||||
@ -121,10 +121,10 @@ evaluateProject' (TaskConfig config logger statter) proxy parser paths = either
|
|||||||
modules <- topologicalSort <$> runImportGraphToModules proxy package
|
modules <- topologicalSort <$> runImportGraphToModules proxy package
|
||||||
trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules)
|
trace $ "evaluating with load order: " <> show (map (modulePath . moduleInfo) modules)
|
||||||
pure (runTermEvaluator @_ @_ @(Value Precise (UtilEff Precise _))
|
pure (runTermEvaluator @_ @_ @(Value Precise (UtilEff Precise _))
|
||||||
(runReader (packageInfo package)
|
|
||||||
(runReader (lowerBound @Span)
|
|
||||||
(runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
(runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
|
||||||
(raiseHandler (runModules (ModuleTable.modulePaths (packageModules package)))
|
(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))))))
|
(evaluate proxy id withTermSpans (Precise.runAllocator . Precise.runDeref) (Concrete.runFunction coerce coerce) modules))))))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user