mirror of
https://github.com/github/semantic.git
synced 2024-12-19 04:41:47 +03:00
Prompt before evaluating each term.
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
parent
7f60152896
commit
0ae579d7c5
@ -72,7 +72,17 @@ repl proxy parser lang paths = runTaskWithOptions debugOptions $ do
|
|||||||
(runReader (lowerBound @Span)
|
(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)))
|
||||||
(evaluate proxy id withTermSpans (Concrete.runFunction coerce coerce) modules)))))))
|
(evaluate proxy id (withTermSpans . step) (Concrete.runFunction coerce coerce) modules)))))))
|
||||||
|
|
||||||
|
step :: Member REPL effects
|
||||||
|
=> SubtermAlgebra (Base term) term (TermEvaluator term address value effects a)
|
||||||
|
-> SubtermAlgebra (Base term) term (TermEvaluator term address value effects a)
|
||||||
|
step recur term = do
|
||||||
|
str <- prompt
|
||||||
|
output str
|
||||||
|
res <- recur term
|
||||||
|
output "leaving term"
|
||||||
|
pure res
|
||||||
|
|
||||||
|
|
||||||
newtype REPLEff address a = REPLEff
|
newtype REPLEff address a = REPLEff
|
||||||
|
Loading…
Reference in New Issue
Block a user