diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-07-11 21:51:23 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-07-13 15:14:45 +0200 |
commit | 9938aed874d3e15e5d21689ea841bdc3e6ebb40e (patch) | |
tree | f3c08864d8e26e29350d541904412cc07da79abf /vernac/lemmas.ml | |
parent | 001c95411b6674423886a085d8f624ea031a9ebc (diff) |
Safer API for Global.body_of_constant and variants.
We aditionally return the abstract universe context inside the option. This
is relatively painless as most uses were using the option as a boolean.
Diffstat (limited to 'vernac/lemmas.ml')
-rw-r--r-- | vernac/lemmas.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vernac/lemmas.ml b/vernac/lemmas.ml index 2eeaf4d5d..cfd489dde 100644 --- a/vernac/lemmas.ml +++ b/vernac/lemmas.ml @@ -49,7 +49,8 @@ let retrieve_first_recthm = function (NamedDecl.get_value (Global.lookup_named id),variable_opacity id) | ConstRef cst -> let cb = Global.lookup_constant cst in - (Global.body_of_constant_body cb, is_opaque cb) + let map (c, ctx) = Vars.subst_instance_constr (Univ.AUContext.instance ctx) c in + (Option.map map (Global.body_of_constant_body cb), is_opaque cb) | _ -> assert false let adjust_guardness_conditions const = function |