From f718e640c3cbe6a891519364992117f49ca333fa Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 19 Aug 2013 12:25:32 -0400 Subject: Allow [where con] to descend within submodule structure; open submodule constraints while checking later signature items --- src/elab_util.sml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/elab_util.sml') diff --git a/src/elab_util.sml b/src/elab_util.sml index 51bcba5a..60245585 100644 --- a/src/elab_util.sml +++ b/src/elab_util.sml @@ -759,12 +759,12 @@ fun mapfoldB {kind, con, sgn_item, sgn, bind} = fn s2' => (SgnFun (m, n, s1', s2'), loc))) | SgnProj _ => S.return2 sAll - | SgnWhere (sgn, x, c) => + | SgnWhere (sgn, ms, x, c) => S.bind2 (sg ctx sgn, fn sgn' => S.map2 (con ctx c, fn c' => - (SgnWhere (sgn', x, c'), loc))) + (SgnWhere (sgn', ms, x, c'), loc))) | SgnError => S.return2 sAll in sg @@ -1248,7 +1248,7 @@ and maxNameSgn (sgn, _) = SgnConst sgis => foldl (fn (sgi, count) => Int.max (maxNameSgi sgi, count)) 0 sgis | SgnVar n => n | SgnFun (_, n, dom, ran) => Int.max (n, Int.max (maxNameSgn dom, maxNameSgn ran)) - | SgnWhere (sgn, _, _) => maxNameSgn sgn + | SgnWhere (sgn, _, _, _) => maxNameSgn sgn | SgnProj (n, _, _) => n | SgnError => 0 -- cgit v1.2.3