diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 09:11:58 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 09:11:58 -0400 |
commit | f2fff6993d2b138c2efc5cadaa53ecbdb1c2e1b3 (patch) | |
tree | 40c991c6a8032bc73433e5d3f9c1db78a98674ef /src/core_util.sml | |
parent | fa0e09c65b849b7bad86bfd457e7cf7b0771df9a (diff) |
Fix a nasty binding bug in CoreUtil
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 8 |
1 files changed, 7 insertions, 1 deletions
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}) |