summaryrefslogtreecommitdiff
path: root/src/expl_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 17:11:24 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-19 17:11:24 -0400
commit6924bb5d394ee9cbdf7dbf376c45a4ee04383c5c (patch)
tree537dd4799d78f6bed5ccac263825fad39f0b5747 /src/expl_util.sml
parent03ecfc6bbbff1492662930a708a1e9be685ef023 (diff)
Explifying functors
Diffstat (limited to 'src/expl_util.sml')
-rw-r--r--src/expl_util.sml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/expl_util.sml b/src/expl_util.sml
index 8c2a0f58..ebdd22d2 100644
--- a/src/expl_util.sml
+++ b/src/expl_util.sml
@@ -353,6 +353,19 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} =
(SgnConst sgis', loc))
| SgnVar _ => S.return2 sAll
+
+ | SgnFun (m, n, s1, s2) =>
+ S.bind2 (sg ctx s1,
+ fn s1' =>
+ S.map2 (sg (bind (ctx, Str (m, s1'))) s2,
+ fn s2' =>
+ (SgnFun (m, n, s1', s2'), loc)))
+ | SgnWhere (sgn, x, c) =>
+ S.bind2 (sg ctx sgn,
+ fn sgn' =>
+ S.map2 (con ctx c,
+ fn c' =>
+ (SgnWhere (sgn', x, c'), loc)))
in
sg
end