Mercurial > urweb
changeset 1585:d5fb78321cca
Handle application in decompileCon
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 02 Nov 2011 08:39:01 -0400 |
parents | c37d8341940a |
children | 03ad79980b55 |
files | src/elaborate.sml |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/elaborate.sml Sat Oct 29 17:30:34 2011 -0400 +++ b/src/elaborate.sml Wed Nov 02 08:39:01 2011 -0400 @@ -3441,7 +3441,12 @@ | L'.CUnit => SOME (L.CUnit, loc) | L'.CUnif (nl, _, _, _, ref (SOME c)) => decompileCon env (E.mliftConInCon nl c) - | _ => NONE + | L'.CApp (f, x) => + (case (decompileCon env f, decompileCon env x) of + (SOME f, SOME x) => SOME (L.CApp (f, x), loc) + | _ => NONE) + + | c => (Print.preface ("WTF?", p_con env (c, loc)); NONE) fun buildNeeded env sgis = #1 (foldl (fn ((sgi, loc), (nd, env')) => @@ -3507,7 +3512,9 @@ case (decompileCon env' c1, decompileCon env' c2) of (SOME c1, SOME c2) => SOME (L.DConstraint (c1, c2), loc) - | _ => NONE) (nconstraints nd) + | _ => (Print.prefaces "BAD" [("c1", p_con env' c1), + ("c2", p_con env' c2)]; + NONE)) (nconstraints nd) val ds' = case SS.listItems (nvals nd) of