on master help sign in
Merge pull request #3595 from yurrriq/improve-induction-error-message

Improve Pruviloj.Induction.induction error message

commiteb94a031a5b118e5af04a4e6c9339a5a5b3893a4 authorDavid Christiansen <david@davidchristiansen.dk> dateWed 28 Dec 2016, 22:00 (10 years ago) parent24c796a22bd91a
1 file changed+3−1
libs/pruviloj/Pruviloj/Induction.idr+3−1
libs/pruviloj/Pruviloj/Induction.idr+3−1
@@ -132,7 +132,9 @@ induction subj =
132132 (_, ty) <- check !getEnv subj
133133 ty' <- forget ty
134134 case headName ty' of
135− Nothing => fail [TermPart ty, TextPart "is not an inductive family"]
135+ Nothing =>
136+ fail [TermPart ty,
137+ TextPart "is not a datatype declared with the data keyword"]
136138 Just fam =>
137139 do let elim = elimN fam
138140 (_,_,elimTy) <- (lookupTyExact elim) <|> (do deriveElim fam elim