diff options
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang/REPLSpec.hs')
| -rw-r--r-- | lambda-calcul/haskell/test/Minilang/REPLSpec.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs index 4eb3f4d..f6279c1 100644 --- a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs +++ b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs @@ -23,6 +23,19 @@ spec = parallel $ "y : b" ] + it "defaults to try to typecheck terms" $ do + let out = + withInput + [ "(let ((Succ (lam (n z s) (s n))) \ + \ (Zero (lam (z s) z))) \ + \ (Succ (Succ Zero)))" + ] + + out + `shouldBe` [ "Bye!", + "Cannot unify type variable f with type (e -> f -> e) -> e due to circularity: The variable already occurs in the type." + ] + it "shows error when trying to load a non-existent file" $ do withInput [":load foo"] `shouldBe` [ "Bye!", |
