From 9e6bd5dd1394c99f0a9b29369a4957c958e0830c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 14 May 2009 09:11:58 -0400 Subject: Fix a nasty binding bug in CoreUtil --- src/core_util.sml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core_util.sml') diff --git a/src/core_util.sml b/src/core_util.sml index ae956121..e3ec8a1d 100644 --- a/src/core_util.sml +++ b/src/core_util.sml @@ -772,7 +772,13 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} = | PConFfi {mod = m, datatyp, params, con, arg, kind} => S.map2 ((case arg of NONE => S.return2 NONE - | SOME c => S.map2 (mfc ctx c, SOME)), + | SOME c => + let + val k = (KType, ErrorMsg.dummySpan) + val ctx' = foldl (fn (x, ctx) => bind (ctx, RelC (x, k))) ctx params + in + S.map2 (mfc ctx' c, SOME) + end), fn arg' => PConFfi {mod = m, datatyp = datatyp, params = params, con = con, arg = arg', kind = kind}) -- cgit v1.2.3