comparison src/elaborate.sml @ 1529:a8a538800278

Better wildification, avoiding some unintentional variable capture
author Adam Chlipala <adam@chlipala.net>
date Sat, 06 Aug 2011 13:07:50 -0400
parents cccf8bf64b30
children 7efcf8f4a44a
comparison
equal deleted inserted replaced
1528:7770ef82c463 1529:a8a538800278
1 (* Copyright (c) 2008-2010, Adam Chlipala 1 (* Copyright (c) 2008-2011, 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 *
3378 | L'.KTupleUnif _ => NONE 3378 | L'.KTupleUnif _ => NONE
3379 3379
3380 | L'.KRel _ => NONE 3380 | L'.KRel _ => NONE
3381 | L'.KFun _ => NONE 3381 | L'.KFun _ => NONE
3382 3382
3383 fun decompileCon env (c, loc) = 3383 fun maybeHnorm env c =
3384 case c of 3384 hnormCon env c
3385 handle E.UnboundNamed _ => c
3386
3387 fun decompileCon env (c as (_, loc)) =
3388 case #1 (maybeHnorm env c) of
3385 L'.CRel i => 3389 L'.CRel i =>
3386 let 3390 let
3387 val (s, _) = E.lookupCRel env i 3391 val (s, _) = E.lookupCRel env i
3388 in 3392 in
3389 SOME (L.CVar ([], s), loc) 3393 SOME (L.CVar ([], s), loc)