comparison src/expl_env.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 c316ca3c9ec6
children b4480a56cab7
comparison
equal deleted inserted replaced
1277:1e6a4f9d3e4a 1278:cd8d2c73ccf4
1 (* Copyright (c) 2008, Adam Chlipala 1 (* Copyright (c) 2008-2010, Adam Chlipala
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
398 end 398 end
399 | SgiVal (x, n, t) => pushENamed env x n t 399 | SgiVal (x, n, t) => pushENamed env x n t
400 | SgiSgn (x, n, sgn) => pushSgnNamed env x n sgn 400 | SgiSgn (x, n, sgn) => pushSgnNamed env x n sgn
401 | SgiStr (x, n, sgn) => pushStrNamed env x n sgn 401 | SgiStr (x, n, sgn) => pushStrNamed env x n sgn
402 402
403 fun patBinds env (p, loc) =
404 case p of
405 PWild => env
406 | PVar (x, t) => pushERel env x t
407 | PPrim _ => env
408 | PCon (_, _, _, NONE) => env
409 | PCon (_, _, _, SOME p) => patBinds env p
410 | PRecord xps => foldl (fn ((_, p, _), env) => patBinds env p) env xps
411
403 end 412 end