diff src/expl_util.sml @ 45:3c1ce1b4eb3d

Explifying functors
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 17:11:24 -0400
parents d16ef24de78b
children d609820c5834
line wrap: on
line diff
--- a/src/expl_util.sml	Thu Jun 19 17:04:08 2008 -0400
+++ b/src/expl_util.sml	Thu Jun 19 17:11:24 2008 -0400
@@ -353,6 +353,19 @@
                         (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