summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-28 14:05:47 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-28 14:05:47 -0400
commit6cc9b62f90276ce8535ead07a3865cd71d98a526 (patch)
tree58484e9f64d99d6b82faa7c6893700c8e9776319 /tests
parent59cfa9f433c17202e1df89de6cdda4cedfae594d (diff)
Shorthand for multi-binding exp declaration
Diffstat (limited to 'tests')
-rw-r--r--tests/eargs.lac8
-rw-r--r--tests/recBad.lac2
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/eargs.lac b/tests/eargs.lac
index d4d6fdf4..bfac497a 100644
--- a/tests/eargs.lac
+++ b/tests/eargs.lac
@@ -3,3 +3,11 @@ val id2 = fn n => id1 n
val pair1 = fn (t1 ::: Type) (t2 ::: Type) (x1 : t1) (x2 : t2) => (x1, x2)
val pair2 = fn (t1 ::: Type) (t2 ::: Type) (x1 : t1) (x2 : t2) () => pair1 x1 x2
+
+val id3 n = id2 n
+val id4 n : int = id3 n
+val id5 (n : int) = id4 n
+val id6 (n : int) : int = id5 n
+
+val id1 (t ::: Type) (x : t) = x
+val id2 (t ::: Type) (x : t) : t = id1 x
diff --git a/tests/recBad.lac b/tests/recBad.lac
index 8d844efb..11934ec0 100644
--- a/tests/recBad.lac
+++ b/tests/recBad.lac
@@ -1,6 +1,6 @@
datatype list a = Nil | Cons of a * list a
-val rec append : t ::: Type -> list t -> list t -> list t = fn t ::: Type => fn ls1 => fn ls2 =>
+fun append (t ::: Type) (ls1 : list t) (ls2 : list t) : list t =
case ls1 of
Nil => ls2
| Cons (h, t) => Cons (h, append t ls2)