comparison src/reduce_local.sml @ 1278:cd8d2c73ccf4

Catch a missed ReduceLocal of field projection annotations
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jun 2010 14:13:06 -0400
parents 5b5c0b552f59
children 3b22c3c67f35
comparison
equal deleted inserted replaced
1277:1e6a4f9d3e4a 1278:cd8d2c73ccf4
284 284
285 | EKApp (e, k) => (EKApp (exp env e, k), loc) 285 | EKApp (e, k) => (EKApp (exp env e, k), loc)
286 | EKAbs (x, e) => (EKAbs (x, exp env e), loc) 286 | EKAbs (x, e) => (EKAbs (x, exp env e), loc)
287 287
288 | ERecord xcs => (ERecord (map (fn (x, e, t) => (con env x, exp env e, con env t)) xcs), loc) 288 | ERecord xcs => (ERecord (map (fn (x, e, t) => (con env x, exp env e, con env t)) xcs), loc)
289 | EField (e, c, others) => 289 | EField (e, c, {field = f, rest = r}) =>
290 let 290 let
291 val e = exp env e 291 val e = exp env e
292 val c = con env c 292 val c = con env c
293 293
294 fun default () = (EField (e, c, others), loc) 294 fun default () = (EField (e, c, {field = con env f, rest = con env r}), loc)
295 in 295 in
296 case (#1 e, #1 c) of 296 case (#1 e, #1 c) of
297 (ERecord xcs, CName x) => 297 (ERecord xcs, CName x) =>
298 (case List.find (fn ((CName x', _), _, _) => x' = x | _ => false) xcs of 298 (case List.find (fn ((CName x', _), _, _) => x' = x | _ => false) xcs of
299 NONE => default () 299 NONE => default ()