@@ -340,7 +340,7 @@ envAtFocus :: ProofState -> TC Env
340envAtFocus ps
340envAtFocus ps
341 | not $ null (holes ps) = do g <- goal (Just (head (holes ps))) (pterm ps)
341 | not $ null (holes ps) = do g <- goal (Just (head (holes ps))) (pterm ps)
342 return (premises g)
342 return (premises g)
343− | otherwise = fail "No holes"
343+ | otherwise = fail $ "No holes in " ++ show (getProofTerm (pterm ps))
345goalAtFocus :: ProofState -> TC (Binder Type)
345goalAtFocus :: ProofState -> TC (Binder Type)
346goalAtFocus ps
346goalAtFocus ps
@@ -1083,7 +1083,8 @@ processTactic t ps
1083 [] -> case t of
1083 [] -> case t of
1084 Focus _ -> return (ps, "") -- harmless to refocus when done, since
1084 Focus _ -> return (ps, "") -- harmless to refocus when done, since
1085 -- 'focus' doesn't fail
1085 -- 'focus' doesn't fail
1086− _ -> fail $ "Nothing to fill in."
1086+ _ -> fail $ "Proof done, nothing to run tactic on: " ++ show t ++
1087+ "\n" ++ show (getProofTerm (pterm ps))
1087 (h:_) -> do ps' <- execStateT (process t h) ps
1088 (h:_) -> do ps' <- execStateT (process t h) ps
1088 let (ns_in, probs')
1089 let (ns_in, probs')
1089 = case solved ps' of
1090 = case solved ps' of