comparison src/explify.sml @ 228:19e5791923d0

Resolving lingering type class constraints
author Adam Chlipala <adamc@hcoop.net>
date Thu, 21 Aug 2008 14:45:31 -0400
parents 0343557355fc
children 3aa010e97db9
comparison
equal deleted inserted replaced
227:524e10c91478 228:19e5791923d0
110 (L'.ECase (explifyExp e, 110 (L'.ECase (explifyExp e,
111 map (fn (p, e) => (explifyPat p, explifyExp e)) pes, 111 map (fn (p, e) => (explifyPat p, explifyExp e)) pes,
112 {disc = explifyCon disc, result = explifyCon result}), loc) 112 {disc = explifyCon disc, result = explifyCon result}), loc)
113 113
114 | L.EError => raise Fail ("explifyExp: EError at " ^ EM.spanToString loc) 114 | L.EError => raise Fail ("explifyExp: EError at " ^ EM.spanToString loc)
115 | L.EUnif (ref (SOME e)) => explifyExp e
116 | L.EUnif _ => raise Fail ("explifyExp: Undetermined EUnif at " ^ EM.spanToString loc)
115 117
116 fun explifySgi (sgi, loc) = 118 fun explifySgi (sgi, loc) =
117 case sgi of 119 case sgi of
118 L.SgiConAbs (x, n, k) => SOME (L'.SgiConAbs (x, n, explifyKind k), loc) 120 L.SgiConAbs (x, n, k) => SOME (L'.SgiConAbs (x, n, explifyKind k), loc)
119 | L.SgiCon (x, n, k, c) => SOME (L'.SgiCon (x, n, explifyKind k, explifyCon c), loc) 121 | L.SgiCon (x, n, k, c) => SOME (L'.SgiCon (x, n, explifyKind k, explifyCon c), loc)