summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/src/Minilang/REPL/Run.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lambda-calcul/haskell/src/Minilang/REPL/Run.hs')
-rw-r--r--lambda-calcul/haskell/src/Minilang/REPL/Run.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/lambda-calcul/haskell/src/Minilang/REPL/Run.hs b/lambda-calcul/haskell/src/Minilang/REPL/Run.hs
index 2282b46..7dc8e81 100644
--- a/lambda-calcul/haskell/src/Minilang/REPL/Run.hs
+++ b/lambda-calcul/haskell/src/Minilang/REPL/Run.hs
@@ -60,7 +60,7 @@ handleCommand ::
handleCommand ClearEnv = getEnv >>= \e -> setEnv (e {env = newEnv, context = newContext})
handleCommand DumpEnv =
getEnv >>= \REPLEnv {..} ->
- output (CurrentEnv env context)
+ output (CurrentEnv env context language)
handleCommand (Load (File file)) = do
t <- load file
case t of
@@ -69,7 +69,11 @@ handleCommand (Load (File file)) = do
handleCommand (Load (Data prog)) = loadProgramInEnv prog
handleCommand (Set (StepTypeChecker st)) = getEnv >>= \e -> setEnv (e {stepTypeCheck = st})
handleCommand (Set (DebugParser st)) = getEnv >>= \e -> setEnv (e {debugParser = st})
-handleCommand (Set (SelectLanguage lang)) = getEnv >>= \e -> setEnv (e {language = lang})
+handleCommand (Set (SelectLanguage lang)) =
+ trace ("selecting language " ++ show lang) $
+ getEnv >>= \e ->
+ setEnv (e {language = lang})
+ >> output (Msg $ "Language set to " <> pack (show lang))
handleCommand Help =
output (Msg helpText)