@@ -190,6 +190,7 @@ unify' ctxt env topx topy =
190190 traceWhen (unifylog ps)
191191 ("Unified " ++ show (topx, topy) ++ " without " ++ show dont ++
192192 "\nSolved: " ++ show u ++ "\nNew problems: " ++ qshow fails
193+ ++ "\nNot unified:\n" ++ show (notunified ps)
193194 ++ "\nCurrent problems:\n" ++ qshow (problems ps)
194195-- ++ show (pterm ps)
195196 ++ "\n----------") $
@@ -761,6 +762,11 @@ solveInProblems x val ((l, r, env, err) : ps)
761762 = ((instantiate val (pToV x l), instantiate val (pToV x r),
762763 updateEnv [(x, val)] env, err) : solveInProblems x val ps)
763764
765+updateNotunified ns nu = up nu where
766+ up [] = []
767+ up ((n, t) : ns) = let t' = updateSolved ns t in
768+ ((n, t') : up ns)
769+
764770updateProblems ctxt ns ps inj holes = up ns ps where
765771 up ns [] = (ns, [])
766772 up ns ((x, y, env, err) : ps) =
@@ -810,6 +816,7 @@ processTactic EndUnify ps
810816 return (ps { pterm = tm',
811817 unified = (h, []),
812818 problems = probs',
819+ notunified = updateNotunified ns (notunified ps),
813820 holes = holes ps \\ map fst ns'' }, "")
814821processTactic (Reorder n) ps
815822 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
@@ -824,6 +831,7 @@ processTactic UnifyProblems ps
824831 pterm' = updateSolved ns' (pterm ps) in
825832 return (ps { pterm = pterm', solved = Nothing, problems = probs',
826833 previous = Just ps, plog = "",
834+ notunified = updateNotunified ns' (notunified ps),
827835 holes = holes ps \\ (map fst ns') }, plog ps)
828836processTactic MatchProblems ps
829837 = let (ns', probs') = matchProblems (context ps)
@@ -851,6 +859,7 @@ processTactic t ps
851859 return (ps' { pterm = pterm'',
852860 solved = Nothing,
853861 problems = probs',
862+ notunified = updateNotunified ns' (notunified ps'),
854863 previous = Just ps, plog = "",
855864 holes = holes ps' \\ (map fst ns')}, plog ps')
856865