aboutsummaryrefslogtreecommitdiff
path: root/library/declare.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2016-08-19 02:35:47 +0200
committerEmilio Jesus Gallego Arias2016-08-19 02:46:38 +0200
commitfc579fdc83b751a44a18d2373e86ab38806e7306 (patch)
treeb325c2ff65c505ad62ac7b3fce6bce28633a60f0 /library/declare.ml
parent543ee0c7ad43874c577416af9f2e5a94d7d1e4d3 (diff)
Make the user_err header an optional parameter.
Suggested by @ppedrot
Diffstat (limited to 'library/declare.ml')
-rw-r--r--library/declare.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/declare.ml b/library/declare.ml
index f8c3cddc43..cc8415cf47 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -462,7 +462,7 @@ let do_universe poly l =
let in_section = Lib.sections_are_opened () in
let () =
if poly && not in_section then
- user_err "Constraint"
+ user_err ~hdr:"Constraint"
(str"Cannot declare polymorphic universes outside sections")
in
let l =
@@ -496,19 +496,19 @@ let do_constraint poly l =
fun (loc, id) ->
try Idmap.find id names
with Not_found ->
- user_err ~loc "Constraint" (str "Undeclared universe " ++ pr_id id)
+ user_err ~loc ~hdr:"Constraint" (str "Undeclared universe " ++ pr_id id)
in
let in_section = Lib.sections_are_opened () in
let () =
if poly && not in_section then
- user_err "Constraint"
+ user_err ~hdr:"Constraint"
(str"Cannot declare polymorphic constraints outside sections")
in
let check_poly loc p loc' p' =
if poly then ()
else if p || p' then
let loc = if p then loc else loc' in
- user_err ~loc "Constraint"
+ user_err ~loc ~hdr:"Constraint"
(str "Cannot declare a global constraint on " ++
str "a polymorphic universe, use "
++ str "Polymorphic Constraint instead")