summaryrefslogtreecommitdiff
path: root/src/expl_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-08 10:28:32 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-08 10:28:32 -0400
commitbaf22271ef6e646c97ddfa1e4193a8857816c67d (patch)
tree1d34bf6404d3e94e6862c5fedbc4e53ed6bab883 /src/expl_util.sml
parent51fd5b1af6b2af7706c0c8604129d99e504a2d36 (diff)
Parametrized datatypes through explify
Diffstat (limited to 'src/expl_util.sml')
-rw-r--r--src/expl_util.sml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/expl_util.sml b/src/expl_util.sml
index 481a96b0..8ec85b19 100644
--- a/src/expl_util.sml
+++ b/src/expl_util.sml
@@ -373,7 +373,7 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} =
S.map2 (con ctx c,
fn c' =>
(SgiCon (x, n, k', c'), loc)))
- | SgiDatatype (x, n, xncs) =>
+ | SgiDatatype (x, n, xs, xncs) =>
S.map2 (ListUtil.mapfold (fn (x, n, c) =>
case c of
NONE => S.return2 (x, n, c)
@@ -381,8 +381,8 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} =
S.map2 (con ctx c,
fn c' => (x, n, SOME c'))) xncs,
fn xncs' =>
- (SgiDatatype (x, n, xncs'), loc))
- | SgiDatatypeImp (x, n, m1, ms, s, xncs) =>
+ (SgiDatatype (x, n, xs, xncs'), loc))
+ | SgiDatatypeImp (x, n, m1, ms, s, xs, xncs) =>
S.map2 (ListUtil.mapfold (fn (x, n, c) =>
case c of
NONE => S.return2 (x, n, c)
@@ -390,7 +390,7 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} =
S.map2 (con ctx c,
fn c' => (x, n, SOME c'))) xncs,
fn xncs' =>
- (SgiDatatypeImp (x, n, m1, ms, s, xncs'), loc))
+ (SgiDatatypeImp (x, n, m1, ms, s, xs, xncs'), loc))
| SgiVal (x, n, c) =>
S.map2 (con ctx c,
fn c' =>
@@ -416,9 +416,9 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} =
bind (ctx, NamedC (x, k))
| SgiCon (x, _, k, _) =>
bind (ctx, NamedC (x, k))
- | SgiDatatype (x, n, xncs) =>
+ | SgiDatatype (x, n, _, xncs) =>
bind (ctx, NamedC (x, (KType, loc)))
- | SgiDatatypeImp (x, _, _, _, _, _) =>
+ | SgiDatatypeImp (x, _, _, _, _, _, _) =>
bind (ctx, NamedC (x, (KType, loc)))
| SgiVal _ => ctx
| SgiStr (x, _, sgn) =>