summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/test
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 21:51:06 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 21:51:06 +0100
commit6727fbc1a45f65436348bc2784ebb9c61b33f830 (patch)
tree777b15a551926650a762803f336ea8c96a137e2c /lambda-calcul/haskell/test
parent6aab2439095f27a8f4c754343f8d8f6674576c2c (diff)
downloadlambda-nantes-6727fbc1a45f65436348bc2784ebb9c61b33f830.tar.gz
allow to run untyped evaluator
Diffstat (limited to 'lambda-calcul/haskell/test')
-rw-r--r--lambda-calcul/haskell/test/Minilang/REPLSpec.hs14
1 files changed, 14 insertions, 0 deletions
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!",