From 79740cde8921854f135df523110bdc2c85283b3e Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Mon, 14 May 2018 22:44:58 +0200 Subject: Update examples --- bad/appType.mim | 1 + bad/divideBy0.mim | 2 +- bad/headOfNil.mim | 1 + bad/ifType.mim | 1 + bad/syntax.mim | 2 ++ bad/tailOfNil.mim | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 bad/syntax.mim (limited to 'bad') diff --git a/bad/appType.mim b/bad/appType.mim index d3d9eba..c48dbf1 100644 --- a/bad/appType.mim +++ b/bad/appType.mim @@ -1 +1,2 @@ +; the function expects an argument of type Int ((lambda x : Int x) false) diff --git a/bad/divideBy0.mim b/bad/divideBy0.mim index 0fc6dc2..c44800c 100644 --- a/bad/divideBy0.mim +++ b/bad/divideBy0.mim @@ -1,2 +1,2 @@ -; to jeszcze nie dziaƂa +; run-time error (/ 3 0) diff --git a/bad/headOfNil.mim b/bad/headOfNil.mim index c74b3d7..263cbd6 100644 --- a/bad/headOfNil.mim +++ b/bad/headOfNil.mim @@ -1 +1,2 @@ +; run-time error (head nil : [Int]) diff --git a/bad/ifType.mim b/bad/ifType.mim index dea4393..3ab4a58 100644 --- a/bad/ifType.mim +++ b/bad/ifType.mim @@ -1,3 +1,4 @@ +; both branches of if-then-else have to have the same type (if true 1 false) diff --git a/bad/syntax.mim b/bad/syntax.mim new file mode 100644 index 0000000..7002838 --- /dev/null +++ b/bad/syntax.mim @@ -0,0 +1,2 @@ +; badly parenthesized expression +(+ 1 4)) diff --git a/bad/tailOfNil.mim b/bad/tailOfNil.mim index 908b114..22fae43 100644 --- a/bad/tailOfNil.mim +++ b/bad/tailOfNil.mim @@ -1 +1,2 @@ +; run-time error (tail nil : [Int]) -- cgit v1.2.3