@@ -133,7 +133,7 @@ goal h tm = g [] tm where
133133 | otherwise
134134 = gb env b `mplus` g ((n, b):env) sc
135135 g env (App f a) = g env f `mplus` g env a
136− g env t = Error "Can't find hole"
136+ g env t = fail "Can't find hole"
137137
138138 gb env (Let t v) = g env t `mplus` g env v
139139 gb env (Guess t v) = g env t `mplus` g env v
@@ -323,10 +323,10 @@ processTactic QED ps = case holes ps of
323323 (tm', ty') <- recheck (context ps) [] tm
324324 return (ps { done = True, pterm = tm' },
325325 "Proof complete: " ++ showEnv [] tm')
326− _ -> Error "Still holes to fill."
326+ _ -> fail "Still holes to fill."
327327processTactic ProofState ps = return (ps, showEnv [] (pterm ps))
328328processTactic Undo ps = case previous ps of
329− Nothing -> Error "Nothing to undo."
329+ Nothing -> fail "Nothing to undo."
330330 Just pold -> return (pold, "")
331331processTactic EndUnify ps = let (h, ns) = unified ps
332332 tm' = updateSolved ns (pterm ps) in
@@ -344,7 +344,7 @@ processTactic EndUnify ps = let (h, ns) = unified ps
344344 updateSolved xs t = t
345345processTactic t ps
346346 = case holes ps of
347− [] -> Error "Nothing to fill in."
347+ [] -> fail "Nothing to fill in."
348348 (h:_) -> do let n = nextname ps
349349 ps' <- execStateT (process t h) ps
350350 return (ps' { previous = Just ps, plog = "" }, plog ps')