summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/test/Minilang
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-05 09:17:15 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-05 09:17:15 +0100
commit438e3f8c5dcdfeead15a6a9a1760f7c254fc54b2 (patch)
treec9da779064fb6e248a4cedd1444a7a3a45a35807 /lambda-calcul/haskell/test/Minilang
parentae59f17cb3d58de7afca7f441d8bcf9a718e024c (diff)
downloadlambda-nantes-438e3f8c5dcdfeead15a6a9a1760f7c254fc54b2.tar.gz
output type of definitions
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang')
-rw-r--r--lambda-calcul/haskell/test/Minilang/REPLSpec.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs
index 81ac25c..861c24c 100644
--- a/lambda-calcul/haskell/test/Minilang/REPLSpec.hs
+++ b/lambda-calcul/haskell/test/Minilang/REPLSpec.hs
@@ -34,6 +34,21 @@ spec = parallel $
"id : <?>"
]
+ it "evaluates typed MiniLang terms with definitions" $ do
+ let out =
+ withInput
+ [ ":lang Typed",
+ "(def id (lam (x) x))",
+ "(id y)"
+ ]
+
+ out
+ `shouldBe` [ "Bye!",
+ "y : c",
+ "id : a -> a",
+ "Language set to Typed"
+ ]
+
it "defaults untyped terms" $ do
let out =
withInput