summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 17:04:08 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 17:04:08 -0400
commit03ecfc6bbbff1492662930a708a1e9be685ef023 (patch)
treefb39f4aa097d27b272943f849bfb97eaa75b160f /tests
parent9386a9382eda9bd19e99c80057398c593aaf812b (diff)
Elaborating functor applications
Diffstat (limited to 'tests')
-rw-r--r--tests/functor.lac20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/functor.lac b/tests/functor.lac
index 6e19603d..7eafd48e 100644
--- a/tests/functor.lac
+++ b/tests/functor.lac
@@ -18,3 +18,23 @@ structure F2 : functor (M : S) : T where type t = M.t = F
structure F3 : functor (M : S) : T = F
(*structure F4 : functor (M : S) : sig type q end = F*)
(*structure F5 : functor (M : S) : T where type t = int = F*)
+
+
+structure O = F (struct
+ type t = int
+ val z = 0
+ val s = fn x : t => x
+end)
+val three : int = O.three
+
+structure S = struct
+ type t = int
+ val z = 0
+ val s = fn x : t => x
+end
+structure SO = F (S)
+val three : int = SO.three
+
+structure SS : S = S
+structure SSO = F (SS)
+val three : SS.t = SSO.three