comparison src/cjrize.sml @ 178:eb3f9913bf31

First part of getting cases through monoize
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 09:26:49 -0400
parents 25b169416ea8
children c7a5c8e0a0e0
comparison
equal deleted inserted replaced
177:5d030ee143e2 178:eb3f9913bf31
106 fun cifyExp ((e, loc), sm) = 106 fun cifyExp ((e, loc), sm) =
107 case e of 107 case e of
108 L.EPrim p => ((L'.EPrim p, loc), sm) 108 L.EPrim p => ((L'.EPrim p, loc), sm)
109 | L.ERel n => ((L'.ERel n, loc), sm) 109 | L.ERel n => ((L'.ERel n, loc), sm)
110 | L.ENamed n => ((L'.ENamed n, loc), sm) 110 | L.ENamed n => ((L'.ENamed n, loc), sm)
111 | L.ECon _ => raise Fail "Cjrize ECon"
111 | L.EFfi mx => ((L'.EFfi mx, loc), sm) 112 | L.EFfi mx => ((L'.EFfi mx, loc), sm)
112 | L.EFfiApp (m, x, es) => 113 | L.EFfiApp (m, x, es) =>
113 let 114 let
114 val (es, sm) = ListUtil.foldlMap cifyExp sm es 115 val (es, sm) = ListUtil.foldlMap cifyExp sm es
115 in 116 in
149 let 150 let
150 val (e, sm) = cifyExp (e, sm) 151 val (e, sm) = cifyExp (e, sm)
151 in 152 in
152 ((L'.EField (e, x), loc), sm) 153 ((L'.EField (e, x), loc), sm)
153 end 154 end
155
156 | L.ECase _ => raise Fail "Cjrize ECase"
154 157
155 | L.EStrcat _ => raise Fail "Cjrize EStrcat" 158 | L.EStrcat _ => raise Fail "Cjrize EStrcat"
156 159
157 | L.EWrite e => 160 | L.EWrite e =>
158 let 161 let