From 6924bb5d394ee9cbdf7dbf376c45a4ee04383c5c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 19 Jun 2008 17:11:24 -0400 Subject: Explifying functors --- src/expl_util.sml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/expl_util.sml') 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 -- cgit v1.2.3