summaryrefslogtreecommitdiff
path: root/tests/sig_impl.lac
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-29 11:05:38 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-29 11:05:38 -0400
commitc8f3f6b28d235722dc56a4df73e43e802bdbd67d (patch)
treec133857b23ef592fe2d9c40080e7dfd3c52430aa /tests/sig_impl.lac
parentb7f84c57522b12bdbd4a7056e5d4f58009a48c95 (diff)
Implicit structure members
Diffstat (limited to 'tests/sig_impl.lac')
-rw-r--r--tests/sig_impl.lac27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/sig_impl.lac b/tests/sig_impl.lac
new file mode 100644
index 00000000..ccb57eb8
--- /dev/null
+++ b/tests/sig_impl.lac
@@ -0,0 +1,27 @@
+signature S = sig
+ type t
+ val x : t
+end
+
+structure M : S = struct
+ val x = 0
+end
+
+signature S = sig
+ con r :: {Type}
+ val x : $r
+end
+
+structure M : S = struct
+ val x = {A = 0, B = "Hi"}
+end
+
+signature S = sig
+ type t
+ con r :: {Type}
+ val x : t -> $r
+end
+
+structure M : S = struct
+ val x = fn v : int => {A = 0, B = "Hi"}
+end