From 1083bb7758a2dfe3f2861bf802627cec16933861 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Tue, 4 Nov 2025 08:10:46 +0100 Subject: Default REPL to Untyped language --- lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lambda-calcul/haskell/test/Minilang/REPL') diff --git a/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs b/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs index 0c2be66..7f77eeb 100644 --- a/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs +++ b/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs @@ -68,17 +68,20 @@ spec :: Spec spec = around withServer $ describe "MiniLang Network REPL" $ do it "evaluates expression and returns evaluation result" $ \Server {serverPort} -> do - let inp = [In "((lam (x) x) y)"] - expectedOutput = [Right $ Evaluated (AST.Sym "y") (Var "y") (TyVar "b")] + let inp = [Com (Set (SelectLanguage Typed)), In "((lam (x) x) y)"] + expectedOutput = + [ Right (Msg "Language set to Typed"), + Right $ Evaluated (AST.Sym "y") (Var "y") (TyVar "b") + ] res <- runTestClient serverPort ".newenv1" inp res `shouldBe` expectedOutput it "allows retrieving empty initial env" $ \Server {serverPort} -> do - let inp = [Com (Set (SelectLanguage Untyped)), Com DumpEnv] + let inp = [Com (Set (SelectLanguage Typed)), Com DumpEnv] expectedOutput = - [ Right (Msg "Language set to Untyped"), - Right $ CurrentEnv newEnv newContext Untyped + [ Right (Msg "Language set to Typed"), + Right $ CurrentEnv newEnv newContext Typed ] res <- runTestClient serverPort ".newenv2" inp -- cgit v1.3.1