@@ -422,7 +422,7 @@ introTy ty mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
422 let (uh, uns) = unified ps
422 let (uh, uns) = unified ps
423-- put (ps { unified = (uh, uns ++ ns) })
423-- put (ps { unified = (uh, uns ++ ns) })
424 return $ Bind n (Lam tyv) (Bind x (Hole t') (P Bound x t'))
424 return $ Bind n (Lam tyv) (Bind x (Hole t') (P Bound x t'))
425− _ -> fail "Nothing to introduce"
425+ _ -> lift $ tfail $ CantIntroduce t'
426introTy ty n ctxt env _ = fail "Can't introduce here."
426introTy ty n ctxt env _ = fail "Can't introduce here."
428intro :: Maybe Name -> RunTactic
428intro :: Maybe Name -> RunTactic
@@ -437,7 +437,7 @@ intro mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
437 Bind y (Pi s) t -> -- trace ("in type " ++ show t') $
437 Bind y (Pi s) t -> -- trace ("in type " ++ show t') $
438 let t' = instantiate (P Bound n s) (pToV y t) in
438 let t' = instantiate (P Bound n s) (pToV y t) in
439 return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
439 return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
440− _ -> fail "Nothing to introduce"
440+ _ -> lift $ tfail $ CantIntroduce t'
441intro n ctxt env _ = fail "Can't introduce here."
441intro n ctxt env _ = fail "Can't introduce here."
443forall :: Name -> Raw -> RunTactic
443forall :: Name -> Raw -> RunTactic