diff options
| author | Gaëtan Gilbert | 2019-06-04 14:39:29 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-10-24 16:33:26 +0200 |
| commit | d13e7e924437b043f83b6a47bfefda69379264b7 (patch) | |
| tree | 06cbf24074c8c8e1803bcaad8c4e297d15149ca9 /kernel/names.ml | |
| parent | 4c779c4fee1134c5d632885de60db73d56021df4 (diff) | |
Raise an anomaly when looking up unknown constant/inductive
If you have access to a kernel name you also should have the
environment in which it is defined, barring hacks. In order to
disfavor hacks we make the standard lookups raise anomalies so that
people are forced to admit they rely on the internals of the
environment.
We find that hackers operated on the code for side effects, for
finding inductive schemes, for simpl and for Print Assumptions. They
attempted to operate on funind but the error handling code they wrote
would have raised another Not_found instead of being useful.
All these uses are indeed hacky so I am satisfied that we are not
forcing new hacks on callers.
Diffstat (limited to 'kernel/names.ml')
| -rw-r--r-- | kernel/names.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/names.ml b/kernel/names.ml index 9802d4f531..b755ff0e08 100644 --- a/kernel/names.ml +++ b/kernel/names.ml @@ -675,6 +675,7 @@ module InductiveOrdered_env = struct end module Indset = Set.Make(InductiveOrdered) +module Indset_env = Set.Make(InductiveOrdered_env) module Indmap = Map.Make(InductiveOrdered) module Indmap_env = Map.Make(InductiveOrdered_env) @@ -688,6 +689,8 @@ module ConstructorOrdered_env = struct let compare = constructor_user_ord end +module Constrset = Set.Make(ConstructorOrdered) +module Constrset_env = Set.Make(ConstructorOrdered_env) module Constrmap = Map.Make(ConstructorOrdered) module Constrmap_env = Map.Make(ConstructorOrdered_env) |
