comparison src/reduce.sml @ 215:2f574c07df2e

Compiling a con-tuple-using test case
author Adam Chlipala <adamc@hcoop.net>
date Sat, 16 Aug 2008 15:09:53 -0400
parents 8a70e2919e86
children e21d0dddda09
comparison
equal deleted inserted replaced
214:766b5475477f 215:2f574c07df2e
121 | CNamed n => 121 | CNamed n =>
122 (case E.lookupCNamed env n of 122 (case E.lookupCNamed env n of
123 (_, _, SOME c') => #1 c' 123 (_, _, SOME c') => #1 c'
124 | _ => c) 124 | _ => c)
125 | CConcat ((CRecord (k, xcs1), loc), (CRecord (_, xcs2), _)) => CRecord (k, xcs1 @ xcs2) 125 | CConcat ((CRecord (k, xcs1), loc), (CRecord (_, xcs2), _)) => CRecord (k, xcs1 @ xcs2)
126
127 | CProj ((CTuple cs, _), n) => #1 (List.nth (cs, n - 1))
128
126 | _ => c 129 | _ => c
127 130
128 and reduceCon env = U.Con.mapB {kind = kind, con = con, bind = bindC} env 131 and reduceCon env = U.Con.mapB {kind = kind, con = con, bind = bindC} env
129 132
130 fun exp env e = 133 fun exp env e =