Mercurial > urweb
comparison src/reduce.sml @ 29:537db4ee89f4
Translation to Cjr
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 10 Jun 2008 18:28:43 -0400 |
parents | 4ab19c19665f |
children | d3cc191cb25f |
comparison
equal
deleted
inserted
replaced
28:104d43266b33 | 29:537db4ee89f4 |
---|---|
143 #1 (reduceExp env (subExpInExp (0, e2) e1)) | 143 #1 (reduceExp env (subExpInExp (0, e2) e1)) |
144 | ECApp ((ECAbs (_, _, e1), loc), c) => | 144 | ECApp ((ECAbs (_, _, e1), loc), c) => |
145 #1 (reduceExp env (subConInExp (0, c) e1)) | 145 #1 (reduceExp env (subConInExp (0, c) e1)) |
146 | 146 |
147 | EField ((ERecord xes, _), (CName x, _), _) => | 147 | EField ((ERecord xes, _), (CName x, _), _) => |
148 (case List.find (fn ((CName x', _), _) => x' = x | 148 (case List.find (fn ((CName x', _), _, _) => x' = x |
149 | _ => false) xes of | 149 | _ => false) xes of |
150 SOME (_, e) => #1 e | 150 SOME (_, e, _) => #1 e |
151 | NONE => e) | 151 | NONE => e) |
152 | 152 |
153 | _ => e | 153 | _ => e |
154 | 154 |
155 and reduceExp env = U.Exp.mapB {kind = kind, con = con, exp = exp, bind = bind} env | 155 and reduceExp env = U.Exp.mapB {kind = kind, con = con, exp = exp, bind = bind} env |