diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | vernac/vernacentries.ml | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -73,6 +73,7 @@ Vernacular Commands was removed. Use Local as a prefix instead. - For the Extraction Language command, "OCaml" is spelled correctly. The older "Ocaml" is still accepted, but deprecated. +- Using “Require” inside a section is deprecated. Universes diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index 0ff6d9c17..5779c07ab 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -805,7 +805,14 @@ let vernac_end_segment ({v=id} as lid) = (* Libraries *) +let warn_require_in_section = + let name = "require-in-section" in + let category = "deprecated" in + CWarnings.create ~name ~category + (fun () -> strbrk "Use of “Require” inside a section is deprecated.") + let vernac_require from import qidl = + if Lib.sections_are_opened () then warn_require_in_section (); let qidl = List.map qualid_of_reference qidl in let root = match from with | None -> None |