summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-24 16:41:12 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-24 16:41:12 -0400
commit7e8a4397825d3ee1addd7326104759294deff832 (patch)
tree3a7a55d48c0d4d3bb8a0620458700ff8304150ec
parent501cdf5bfe6d9348de1cab3e525de665c05af731 (diff)
Abstracting datatypes with signature ascription
-rw-r--r--src/elaborate.sml3
-rw-r--r--tests/datatypeMod.lac2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index 9cc695e1..d5bae866 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -1724,6 +1724,9 @@ fun subSgn (env, denv) sgn1 (sgn2 as (_, loc2)) =
case sgi1 of
L'.SgiConAbs (x', n1, k1) => found (x', n1, k1, NONE)
| L'.SgiCon (x', n1, k1, c1) => found (x', n1, k1, SOME c1)
+ | L'.SgiDatatype (x', n1, _) => found (x', n1, (L'.KType, loc), NONE)
+ | L'.SgiDatatypeImp (x', n1, m1, ms, s) =>
+ found (x', n1, (L'.KType, loc), SOME (L'.CModProj (m1, ms, s), loc))
| _ => NONE
end)
diff --git a/tests/datatypeMod.lac b/tests/datatypeMod.lac
index e6e321f4..22604d9f 100644
--- a/tests/datatypeMod.lac
+++ b/tests/datatypeMod.lac
@@ -14,3 +14,5 @@ structure M3 : sig datatype t = datatype M.t end = M2
structure M4 : sig datatype t = datatype M.t end = M
val b : M3.t = M4.B
+
+structure Ma : sig type t end = M