@@ -59,6 +59,7 @@ data Tactic = Attack
60 | StartUnify Name
60 | StartUnify Name
61 | EndUnify
61 | EndUnify
63 | ComputeLet Name
64 | ComputeLet Name
64 | Simplify
65 | Simplify
@@ -781,6 +782,7 @@ keepGiven du (u@(n, _) : us) hs
781 | n `elem` du = u : keepGiven du us hs
782 | n `elem` du = u : keepGiven du us hs
782keepGiven du (u : us) hs = keepGiven du us hs
783keepGiven du (u : us) hs = keepGiven du us hs
785+updateSolved :: [(Name, Term)] -> Term -> Term
784updateSolved xs x = updateSolved' xs x
786updateSolved xs x = updateSolved' xs x
785updateSolved' [] x = x
787updateSolved' [] x = x
786updateSolved' xs (Bind n (Hole ty) t)
788updateSolved' xs (Bind n (Hole ty) t)
@@ -874,6 +876,12 @@ processTactic EndUnify ps
874 problems = probs',
876 problems = probs',
875 notunified = updateNotunified ns'' (notunified ps),
877 notunified = updateNotunified ns'' (notunified ps),
876 holes = holes ps \\ map fst ns'' }, "")
878 holes = holes ps \\ map fst ns'' }, "")
879+processTactic UnifyAll ps
880+ = trace (show (notunified ps)) $
881+ let tm' = updateSolved (notunified ps) (pterm ps) in
882+ return (ps { pterm = tm',
884+ holes = holes ps \\ map fst (notunified ps) }, "")
877processTactic (Reorder n) ps
885processTactic (Reorder n) ps
878 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
886 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
879 return (ps' { previous = Just ps, plog = "" }, plog ps')
887 return (ps' { previous = Just ps, plog = "" }, plog ps')