m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/bad
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-13 21:12:57 +0200
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-13 21:17:15 +0200
commit76478dd79705313860c00008cee75c48db814ecc (patch)
tree2d08f2577674e9c96c96fe1653073732f5616fdc /bad
parent3939b1fa57007fabb350dc91eb13b66f9480c244 (diff)
Add examples
Diffstat (limited to 'bad')
-rw-r--r--bad/appType.mim1
-rw-r--r--bad/divideBy0.mim2
-rw-r--r--bad/headOfNil.mim1
-rw-r--r--bad/ifType.mim3
-rw-r--r--bad/outOfTupleBounds.mim4
-rw-r--r--bad/tailOfNil.mim1
6 files changed, 12 insertions, 0 deletions
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])