comparison src/elaborate.sml @ 397:4d519baf357c

ListShop skeleton
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 12:06:35 -0400
parents 24a31b35e08f
children ebf27030ae3b
comparison
equal deleted inserted replaced
396:040edfade639 397:4d519baf357c
2290 val env = E.sgiBinds env sgi2All 2290 val env = E.sgiBinds env sgi2All
2291 val env = if n1 = n2 then 2291 val env = if n1 = n2 then
2292 env 2292 env
2293 else 2293 else
2294 E.pushCNamedAs env x n1 (L'.KType, loc) 2294 E.pushCNamedAs env x n1 (L'.KType, loc)
2295 (SOME (L'.CNamed n1, loc)) 2295 (SOME (L'.CNamed n2, loc))
2296 in 2296 in
2297 SOME (env, denv) 2297 SOME (env, denv)
2298 end 2298 end
2299 2299
2300 val env = E.pushCNamedAs env x n1 k' NONE
2301 val env = if n1 = n2 then
2302 env
2303 else
2304 E.pushCNamedAs env x n2 k' (SOME (L'.CNamed n1, loc))
2300 val env = foldl (fn (x, env) => E.pushCRel env x k) env xs1 2305 val env = foldl (fn (x, env) => E.pushCRel env x k) env xs1
2301 fun xncBad ((x1, _, t1), (x2, _, t2)) = 2306 fun xncBad ((x1, _, t1), (x2, _, t2)) =
2302 String.compare (x1, x2) <> EQUAL 2307 String.compare (x1, x2) <> EQUAL
2303 orelse case (t1, t2) of 2308 orelse case (t1, t2) of
2304 (NONE, NONE) => false 2309 (NONE, NONE) => false