comparison src/reduce.sml @ 1122:85d194409b17

Reduce concatenations of the empty record; unpoly non-recursive functions
author Adam Chlipala <adamc@hcoop.net>
date Sun, 10 Jan 2010 13:44:22 -0500
parents 0657e5adc938
children 51e596feec37
comparison
equal deleted inserted replaced
1121:0cee0c8d8c37 1122:85d194409b17
289 val c2 = con env c2 289 val c2 = con env c2
290 in 290 in
291 case (#1 c1, #1 c2) of 291 case (#1 c1, #1 c2) of
292 (CRecord (k, xcs1), CRecord (_, xcs2)) => 292 (CRecord (k, xcs1), CRecord (_, xcs2)) =>
293 (CRecord (kind env k, xcs1 @ xcs2), loc) 293 (CRecord (kind env k, xcs1 @ xcs2), loc)
294 | (CRecord (_, []), _) => c2
295 | (_, CRecord (_, [])) => c1
294 | _ => (CConcat (c1, c2), loc) 296 | _ => (CConcat (c1, c2), loc)
295 end 297 end
296 | CMap (dom, ran) => (CMap (kind env dom, kind env ran), loc) 298 | CMap (dom, ran) => (CMap (kind env dom, kind env ran), loc)
297 299
298 | CUnit => all 300 | CUnit => all