changeset 159:1e382d10e832

Abstracting datatypes with signature ascription
author Adam Chlipala <adamc@hcoop.net>
date Thu, 24 Jul 2008 16:41:12 -0400
parents b4b70de488e9
children 870e8abbe3b9
files src/elaborate.sml tests/datatypeMod.lac
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/elaborate.sml	Thu Jul 24 16:36:41 2008 -0400
+++ b/src/elaborate.sml	Thu Jul 24 16:41:12 2008 -0400
@@ -1724,6 +1724,9 @@
                                      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)
 
--- a/tests/datatypeMod.lac	Thu Jul 24 16:36:41 2008 -0400
+++ b/tests/datatypeMod.lac	Thu Jul 24 16:41:12 2008 -0400
@@ -14,3 +14,5 @@
 structure M4 : sig datatype t = datatype M.t end = M
 
 val b : M3.t = M4.B
+
+structure Ma : sig type t end = M