From 76478dd79705313860c00008cee75c48db814ecc Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 13 May 2018 21:12:57 +0200 Subject: Add examples --- bad/appType.mim | 1 + bad/divideBy0.mim | 2 ++ bad/headOfNil.mim | 1 + bad/ifType.mim | 3 +++ bad/outOfTupleBounds.mim | 4 ++++ bad/tailOfNil.mim | 1 + 6 files changed, 12 insertions(+) create mode 100644 bad/appType.mim create mode 100644 bad/divideBy0.mim create mode 100644 bad/headOfNil.mim create mode 100644 bad/ifType.mim create mode 100644 bad/outOfTupleBounds.mim create mode 100644 bad/tailOfNil.mim (limited to 'bad') diff --git a/bad/appType.mim b/bad/appType.mim new file mode 100644 index 0000000..d3d9eba --- /dev/null +++ b/bad/appType.mim @@ -0,0 +1 @@ +((lambda x : Int x) false) diff --git a/bad/divideBy0.mim b/bad/divideBy0.mim new file mode 100644 index 0000000..0fc6dc2 --- /dev/null +++ b/bad/divideBy0.mim @@ -0,0 +1,2 @@ +; to jeszcze nie dziaƂa +(/ 3 0) diff --git a/bad/headOfNil.mim b/bad/headOfNil.mim new file mode 100644 index 0000000..c74b3d7 --- /dev/null +++ b/bad/headOfNil.mim @@ -0,0 +1 @@ +(head nil : [Int]) diff --git a/bad/ifType.mim b/bad/ifType.mim new file mode 100644 index 0000000..dea4393 --- /dev/null +++ b/bad/ifType.mim @@ -0,0 +1,3 @@ +(if true + 1 + false) diff --git a/bad/outOfTupleBounds.mim b/bad/outOfTupleBounds.mim new file mode 100644 index 0000000..9069ea6 --- /dev/null +++ b/bad/outOfTupleBounds.mim @@ -0,0 +1,4 @@ +; tuples are indexed from 1 +; we know the tuple's size during typechecking, so this is a static typechecking +; error +{1 2 3}.4 diff --git a/bad/tailOfNil.mim b/bad/tailOfNil.mim new file mode 100644 index 0000000..908b114 --- /dev/null +++ b/bad/tailOfNil.mim @@ -0,0 +1 @@ +(tail nil : [Int]) -- cgit v1.2.3