comparison src/monoize.sml @ 100:f0f59e918cac

page declaration, up through monoize
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 10:11:35 -0400
parents 274116d1a4cd
children 5f04adf47f48
comparison
equal deleted inserted replaced
99:5182f0c80d2e 100:f0f59e918cac
162 in 162 in
163 case d of 163 case d of
164 L.DCon _ => NONE 164 L.DCon _ => NONE
165 | L.DVal (x, n, t, e) => SOME (Env.pushENamed env x n t (SOME e), 165 | L.DVal (x, n, t, e) => SOME (Env.pushENamed env x n t (SOME e),
166 (L'.DVal (x, n, monoType env t, monoExp env e), loc)) 166 (L'.DVal (x, n, monoType env t, monoExp env e), loc))
167 | L.DPage ((c, _), e) =>
168 (case c of
169 L.CRecord (_, vs) => SOME (env,
170 (L'.DPage (map (fn (nm, t) => (monoName env nm,
171 monoType env t)) vs,
172 monoExp env e), loc))
173 | _ => poly ())
167 end 174 end
168 175
169 fun monoize env ds = 176 fun monoize env ds =
170 let 177 let
171 val (_, ds) = List.foldl (fn (d, (env, ds)) => 178 val (_, ds) = List.foldl (fn (d, (env, ds)) =>