Mercurial > urweb
comparison src/reduce.sml @ 330:f307cdd08d81
Remove unneeded 'rec' in Reduce
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 13 Sep 2008 10:33:30 -0400 |
parents | e21d0dddda09 |
children | 075b36dbb1a4 |
comparison
equal
deleted
inserted
replaced
329:eec65c11d3e2 | 330:f307cdd08d81 |
---|---|
146 | 146 |
147 | _ => e | 147 | _ => e |
148 | 148 |
149 and reduceExp env = U.Exp.mapB {kind = kind, con = con, exp = exp, bind = bind} env | 149 and reduceExp env = U.Exp.mapB {kind = kind, con = con, exp = exp, bind = bind} env |
150 | 150 |
151 fun decl env d = d | 151 fun decl env d = |
152 case d of | |
153 DValRec [vi as (_, n, _, e, _)] => | |
154 let | |
155 fun kind _ = false | |
156 fun con _ = false | |
157 fun exp e = | |
158 case e of | |
159 ENamed n' => n' = n | |
160 | _ => false | |
161 in | |
162 if U.Exp.exists {kind = kind, con = con, exp = exp} e then | |
163 d | |
164 else | |
165 DVal vi | |
166 end | |
167 | _ => d | |
152 | 168 |
153 val reduce = U.File.mapB {kind = kind, con = con, exp = exp, decl = decl, bind = bind} E.empty | 169 val reduce = U.File.mapB {kind = kind, con = con, exp = exp, decl = decl, bind = bind} E.empty |
154 | 170 |
155 end | 171 end |