@@ -681,8 +681,8 @@ casetac tm induction ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' = do
681 (tmv, tmt) <- lift $ check ctxt env tm
681 (tmv, tmt) <- lift $ check ctxt env tm
682 let tmt' = normalise ctxt env tmt
682 let tmt' = normalise ctxt env tmt
683 let (tacn, tacstr, tactt) = if induction
683 let (tacn, tacstr, tactt) = if induction
684− then (ElimN, "an eliminator", "Induction")
684+ then (ElimN, "eliminator", "Induction")
685− else (CaseN, "a case function", "Case analysis")
685+ else (CaseN, "case analysis", "Case analysis")
686 case unApply tmt' of
686 case unApply tmt' of
687 (P _ tnm _, tyargs) -> do
687 (P _ tnm _, tyargs) -> do
688 case lookupTy (SN (tacn tnm)) ctxt of
688 case lookupTy (SN (tacn tnm)) ctxt of
@@ -717,9 +717,10 @@ casetac tm induction ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' = do
717 (scv, sct) <- lift $ check ctxt env res'
717 (scv, sct) <- lift $ check ctxt env res'
718 let (scv', _) = specialise ctxt env [] scv
718 let (scv', _) = specialise ctxt env [] scv
719 return scv'
719 return scv'
720− [] -> lift $ tfail $ Msg $ tactt ++ " needs " ++ tacstr ++ " for " ++ show tnm
720+ [] -> lift $ tfail $ NoEliminator tacstr tmt'
721 xs -> lift $ tfail $ Msg $ "Multiple definitions found when searching for " ++ tacstr ++ "of " ++ show tnm
721 xs -> lift $ tfail $ Msg $ "Multiple definitions found when searching for " ++ tacstr ++ "of " ++ show tnm
722− _ -> fail $ "Unkown type for " ++ if induction then "induction" else "case analysis"
722+ _ -> lift $ tfail $ NoEliminator (if induction then "induction" else "case analysis")
723 where scname = sMN 0 "scarg"
724 where scname = sMN 0 "scarg"
724 makeConsArg (nm, ty) = P Bound nm ty
725 makeConsArg (nm, ty) = P Bound nm ty
725 bindConsArgs ((nm, ty):args) v = Bind nm (Hole ty) $ bindConsArgs args v
726 bindConsArgs ((nm, ty):args) v = Bind nm (Hole ty) $ bindConsArgs args v