@@ -59,6 +59,7 @@ data Tactic = Attack
5959 | Solve
6060 | StartUnify Name
6161 | EndUnify
62+ | UnifyAll
6263 | Compute
6364 | ComputeLet Name
6465 | Simplify
@@ -781,6 +782,7 @@ keepGiven du (u@(n, _) : us) hs
781782 | n `elem` du = u : keepGiven du us hs
782783keepGiven du (u : us) hs = keepGiven du us hs
783784
785+updateSolved :: [(Name, Term)] -> Term -> Term
784786updateSolved xs x = updateSolved' xs x
785787updateSolved' [] x = x
786788updateSolved' xs (Bind n (Hole ty) t)
@@ -874,6 +876,12 @@ processTactic EndUnify ps
874876 problems = probs',
875877 notunified = updateNotunified ns'' (notunified ps),
876878 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',
883+ notunified = [],
884+ holes = holes ps \\ map fst (notunified ps) }, "")
877885processTactic (Reorder n) ps
878886 = do ps' <- execStateT (tactic (Just n) reorder_claims) ps
879887 return (ps' { previous = Just ps, plog = "" }, plog ps')