@@ -186,7 +186,7 @@ exact guess ctxt env (Bind x (Hole ty) sc) =
186 return $ Bind x (Guess ty val) sc
186 return $ Bind x (Guess ty val) sc
187exact _ _ _ _ = fail "Can't fill here."
187exact _ _ _ _ = fail "Can't fill here."
189−-- As fill, but attempts to solve other goals by unification
189+-- As exact, but attempts to solve other goals by unification
191fill :: Raw -> RunTactic
191fill :: Raw -> RunTactic
192fill guess ctxt env (Bind x (Hole ty) sc) =
192fill guess ctxt env (Bind x (Hole ty) sc) =
@@ -252,6 +252,12 @@ eval_in t ctxt env tm =
252 showEnv env valty'))
252 showEnv env valty'))
253 return tm
253 return tm
255+-- shuffleHoles :: Term -> Term
256+-- shuffleHoles tm = shuffle [] tm
258+-- shuffle ns (Bind n b sc)
255processTactic :: Tactic -> ProofState -> TC (ProofState, String)
261processTactic :: Tactic -> ProofState -> TC (ProofState, String)
256processTactic QED ps = case holes ps of
262processTactic QED ps = case holes ps of
257 [] -> do let tm = pterm ps
263 [] -> do let tm = pterm ps
@@ -297,6 +303,8 @@ processTactic t ps
297 updateSolved xs (Bind n b t)
303 updateSolved xs (Bind n b t)
298 | otherwise = Bind n (fmap (updateSolved xs) b) (updateSolved xs t)
304 | otherwise = Bind n (fmap (updateSolved xs) b) (updateSolved xs t)
299 updateSolved xs (App f a) = App (updateSolved xs f) (updateSolved xs a)
305 updateSolved xs (App f a) = App (updateSolved xs f) (updateSolved xs a)
306+ updateSolved xs (P _ n _)
307+ | Just v <- lookup n xs = v
300 updateSolved xs t = t
308 updateSolved xs t = t
302process :: Tactic -> Name -> ProofState -> StateT TState TC ProofState
310process :: Tactic -> Name -> ProofState -> StateT TState TC ProofState