summaryrefslogtreecommitdiff
path: root/src/reduce.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-26 10:02:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-26 10:02:34 -0400
commit1d4b2683a02155a474d79436247d8a1d293237ae (patch)
tree205f8600aad0b2c149e08318f0e6cf64a1b26a67 /src/reduce.sml
parentf362668549c8db401474c7be1e15cd9e156d0e91 (diff)
Cjrize cfold
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index 4c36268c..887bc0e2 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -121,7 +121,14 @@ fun kind k = k
fun con env c =
case c of
- CApp ((CAbs (_, _, c1), loc), c2) =>
+ CApp ((CApp ((CApp ((CFold ks, _), f), _), i), loc), (CRecord (k, xcs), _)) =>
+ (case xcs of
+ [] => #1 i
+ | (n, v) :: rest =>
+ #1 (reduceCon env (CApp ((CApp ((CApp (f, n), loc), v), loc),
+ (CApp ((CApp ((CApp ((CFold ks, loc), f), loc), i), loc),
+ (CRecord (k, rest), loc)), loc)), loc)))
+ | CApp ((CAbs (_, _, c1), loc), c2) =>
#1 (reduceCon env (subConInCon (0, c2) c1))
| CNamed n =>
(case E.lookupCNamed env n of