# HG changeset patch # User Adam Chlipala # Date 1320237541 14400 # Node ID d5fb78321cca9777df5b3ccfb6f0fda2e281125e # Parent c37d8341940aaec9ce7361e178de0556039919f0 Handle application in decompileCon diff -r c37d8341940a -r d5fb78321cca src/elaborate.sml --- 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