aboutsummaryrefslogtreecommitdiff
path: root/tactics/hints.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-03-12 15:11:35 +0100
committerPierre-Marie Pédrot2020-03-18 11:44:50 +0100
commit96ec58df041dc0111df0e681269aed9d0e9b571a (patch)
tree7abcbb4ec26dfd3fb2ac81934d6e8c8602cc7d80 /tactics/hints.ml
parent245b94cd075b6be527590c425a98262d89577909 (diff)
Use a 3-valued flag for hint locality.
We reuse the same type as for options, even though it is a bit ill-named. At least it allows to share code with it.
Diffstat (limited to 'tactics/hints.ml')
-rw-r--r--tactics/hints.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tactics/hints.ml b/tactics/hints.ml
index 8b81b36fa2..7cde342662 100644
--- a/tactics/hints.ml
+++ b/tactics/hints.ml
@@ -1410,7 +1410,12 @@ let interp_hints ~poly =
let _, tacexp = Genintern.generic_intern env tacexp in
HintsExternEntry ({ hint_priority = Some pri; hint_pattern = pat }, tacexp)
-let add_hints ~local ~superglobal dbnames h =
+let add_hints ~locality dbnames h =
+ let local, superglobal = match locality with
+ | Goptions.OptDefault | Goptions.OptGlobal -> false, true
+ | Goptions.OptExport -> false, false
+ | Goptions.OptLocal -> true, false
+ in
if String.List.mem "nocore" dbnames then
user_err Pp.(str "The hint database \"nocore\" is meant to stay empty.");
assert (not (List.is_empty dbnames));