diff options
| author | Pierre-Marie Pédrot | 2020-02-06 12:49:04 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-02-06 12:49:04 +0100 |
| commit | 746ff224e7fba9fc81b8a9499f9fec2ab8af4570 (patch) | |
| tree | 622d66738ae0c9a60d251927168f0c57ea890801 /vernac | |
| parent | 55e04a94e52822700ab7215857209da62ef5d2af (diff) | |
| parent | f86fd4b52a29e2ef63f03cc67c845f1fa05aae13 (diff) | |
Merge PR #11478: Nicer kernel universe error for inductives
Reviewed-by: ppedrot
Diffstat (limited to 'vernac')
| -rw-r--r-- | vernac/himsg.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vernac/himsg.ml b/vernac/himsg.ml index eb39564fed..17c3e0395a 100644 --- a/vernac/himsg.ml +++ b/vernac/himsg.ml @@ -1216,8 +1216,12 @@ let error_bad_entry () = let error_large_non_prop_inductive_not_in_type () = str "Large non-propositional inductive types must be in Type." -let error_inductive_bad_univs () = - str "Incorrect universe constraints declared for inductive type." +let error_inductive_missing_constraints (us,ind_univ) = + let pr_u = Univ.Universe.pr_with UnivNames.pr_with_global_universes in + str "Missing universe constraint declared for inductive type:" ++ spc() + ++ v 0 (prlist_with_sep spc (fun u -> + hov 0 (pr_u u ++ str " <= " ++ pr_u ind_univ)) + (Univ.Universe.Set.elements us)) (* Recursion schemes errors *) @@ -1256,7 +1260,7 @@ let explain_inductive_error = function | BadEntry -> error_bad_entry () | LargeNonPropInductiveNotInType -> error_large_non_prop_inductive_not_in_type () - | BadUnivs -> error_inductive_bad_univs () + | MissingConstraints csts -> error_inductive_missing_constraints csts (* Recursion schemes errors *) |
