From 6727fbc1a45f65436348bc2784ebb9c61b33f830 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Sun, 2 Nov 2025 21:51:06 +0100 Subject: allow to run untyped evaluator --- lambda-calcul/haskell/test/Minilang/REPLSpec.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lambda-calcul/haskell/test') diff --git a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs index f6279c1..d23ffbd 100644 --- a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs +++ b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs @@ -36,6 +36,20 @@ spec = parallel $ "Cannot unify type variable f with type (e -> f -> e) -> e due to circularity: The variable already occurs in the type." ] + it "do not typecheck term when language is set to 'untyped'" $ do + let out = + withInput + [ ":lang Untyped", + "(let ((Succ (lam (n z s) (s n))) \ + \ (Zero (lam (z s) z))) \ + \ (Succ (Succ Zero)))" + ] + + out + `shouldBe` [ "Bye!", + "(lam (z s) (s ((lam (n z s) (s n)) (lam (z s) z)))) : " + ] + it "shows error when trying to load a non-existent file" $ do withInput [":load foo"] `shouldBe` [ "Bye!", -- cgit v1.3.1