@@ -422,7 +422,7 @@ introTy ty mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
422422 let (uh, uns) = unified ps
423423-- put (ps { unified = (uh, uns ++ ns) })
424424 return $ Bind n (Lam tyv) (Bind x (Hole t') (P Bound x t'))
425− _ -> fail "Nothing to introduce"
425+ _ -> lift $ tfail $ CantIntroduce t'
426426introTy ty n ctxt env _ = fail "Can't introduce here."
427427
428428intro :: Maybe Name -> RunTactic
@@ -437,7 +437,7 @@ intro mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
437437 Bind y (Pi s) t -> -- trace ("in type " ++ show t') $
438438 let t' = instantiate (P Bound n s) (pToV y t) in
439439 return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
440− _ -> fail "Nothing to introduce"
440+ _ -> lift $ tfail $ CantIntroduce t'
441441intro n ctxt env _ = fail "Can't introduce here."
442442
443443forall :: Name -> Raw -> RunTactic