diff options
| author | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-04 08:10:46 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-04 08:47:15 +0100 |
| commit | 1083bb7758a2dfe3f2861bf802627cec16933861 (patch) | |
| tree | 11bcec09bc5d32eeb72de801bc2337c8098bb728 /lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs | |
| parent | 51194425997225de7b7ca83e26b76b9a82f0e10d (diff) | |
| download | lambda-nantes-1083bb7758a2dfe3f2861bf802627cec16933861.tar.gz | |
Default REPL to Untyped language
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs')
| -rw-r--r-- | lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs | 13 |
1 files changed, 8 insertions, 5 deletions
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 |
