1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00

Prompt before evaluating each term.

Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
Rob Rix 2018-08-01 12:05:25 -04:00
parent 7f60152896
commit 0ae579d7c5

View File

@ -72,7 +72,17 @@ repl proxy parser lang paths = runTaskWithOptions debugOptions $ do
(runReader (lowerBound @Span)
(runReader (lowerBound @(ModuleTable (NonEmpty (Module (ModuleResult Precise)))))
(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