diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-24 10:09:21 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-24 10:09:21 -0400 |
commit | 9e860c86c7d9c763deb9d51490a6766d9c72ed25 (patch) | |
tree | 7ba7c7cada5e7afa00c3e46879eb9974849286cf /src/core_util.sml | |
parent | f19ae3bb20fa0c60e737606949b2bec6e3ae04f9 (diff) |
Record cut
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core_util.sml b/src/core_util.sml index 9cde8ab9..1964ce9d 100644 --- a/src/core_util.sml +++ b/src/core_util.sml @@ -282,6 +282,16 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} = S.map2 (mfc ctx rest, fn rest' => (EField (e', c', {field = field', rest = rest'}), loc))))) + | ECut (e, c, {field, rest}) => + S.bind2 (mfe ctx e, + fn e' => + S.bind2 (mfc ctx c, + fn c' => + S.bind2 (mfc ctx field, + fn field' => + S.map2 (mfc ctx rest, + fn rest' => + (ECut (e', c', {field = field', rest = rest'}), loc))))) | EFold k => S.map2 (mfk k, fn k' => |