@@ -190,6 +190,7 @@ unify' ctxt env topx topy =
190 traceWhen (unifylog ps)
190 traceWhen (unifylog ps)
191 ("Unified " ++ show (topx, topy) ++ " without " ++ show dont ++
191 ("Unified " ++ show (topx, topy) ++ " without " ++ show dont ++
192 "\nSolved: " ++ show u ++ "\nNew problems: " ++ qshow fails
192 "\nSolved: " ++ show u ++ "\nNew problems: " ++ qshow fails
193+ ++ "\nNot unified:\n" ++ show (notunified ps)
193 ++ "\nCurrent problems:\n" ++ qshow (problems ps)
194 ++ "\nCurrent problems:\n" ++ qshow (problems ps)
194-- ++ show (pterm ps)
195-- ++ show (pterm ps)
195 ++ "\n----------") $
196 ++ "\n----------") $
@@ -761,6 +762,11 @@ solveInProblems x val ((l, r, env, err) : ps)
761 = ((instantiate val (pToV x l), instantiate val (pToV x r),
762 = ((instantiate val (pToV x l), instantiate val (pToV x r),
762 updateEnv [(x, val)] env, err) : solveInProblems x val ps)
763 updateEnv [(x, val)] env, err) : solveInProblems x val ps)
765+updateNotunified ns nu = up nu where
767+ up ((n, t) : ns) = let t' = updateSolved ns t in
764updateProblems ctxt ns ps inj holes = up ns ps where
770updateProblems ctxt ns ps inj holes = up ns ps where
765 up ns [] = (ns, [])
771 up ns [] = (ns, [])
766 up ns ((x, y, env, err) : ps) =
772 up ns ((x, y, env, err) : ps) =
@@ -810,6 +816,7 @@ processTactic EndUnify ps
810 return (ps { pterm = tm',
816 return (ps { pterm = tm',
811 unified = (h, []),
817 unified = (h, []),
812 problems = probs',
818 problems = probs',
819+ notunified = updateNotunified ns (notunified ps),
813 holes = holes ps \\ map fst ns'' }, "")
820 holes = holes ps \\ map fst ns'' }, "")
814processTactic (Reorder n) ps
821processTactic (Reorder n) ps
815 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
822 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
@@ -824,6 +831,7 @@ processTactic UnifyProblems ps
824 pterm' = updateSolved ns' (pterm ps) in
831 pterm' = updateSolved ns' (pterm ps) in
825 return (ps { pterm = pterm', solved = Nothing, problems = probs',
832 return (ps { pterm = pterm', solved = Nothing, problems = probs',
826 previous = Just ps, plog = "",
833 previous = Just ps, plog = "",
834+ notunified = updateNotunified ns' (notunified ps),
827 holes = holes ps \\ (map fst ns') }, plog ps)
835 holes = holes ps \\ (map fst ns') }, plog ps)
828processTactic MatchProblems ps
836processTactic MatchProblems ps
829 = let (ns', probs') = matchProblems (context ps)
837 = let (ns', probs') = matchProblems (context ps)
@@ -851,6 +859,7 @@ processTactic t ps
851 return (ps' { pterm = pterm'',
859 return (ps' { pterm = pterm'',
852 solved = Nothing,
860 solved = Nothing,
853 problems = probs',
861 problems = probs',
862+ notunified = updateNotunified ns' (notunified ps'),
854 previous = Just ps, plog = "",
863 previous = Just ps, plog = "",
855 holes = holes ps' \\ (map fst ns')}, plog ps')
864 holes = holes ps' \\ (map fst ns')}, plog ps')