aboutsummaryrefslogtreecommitdiff
path: root/vernac/declareDef.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-02-29 15:25:42 -0500
committerEmilio Jesus Gallego Arias2020-03-12 20:36:36 -0400
commit79bcf1c0a22e736c4e2cae3460c35b3d9fca9aa0 (patch)
tree5601c7ed11caa7e109edb2e462aa8e590303406b /vernac/declareDef.ml
parentc9f7a31ef67ce638ec591f9e5760941706bc12bc (diff)
[lemmas] Handle mutual lemmas more uniformly.
We split the paths for mutual / non-mutual constants, and we enforce some further invariants, in particular we avoid messing around with the body of saved constants, and using the indirect accessor. This should be almost semantically equivalent to the previous code, including some questionable choices present there. In further cleanups we will move this code to Declare, which should hopefully help clarify some of the semantics.
Diffstat (limited to 'vernac/declareDef.ml')
-rw-r--r--vernac/declareDef.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/vernac/declareDef.ml b/vernac/declareDef.ml
index bd857a6e38..dea2ccb9af 100644
--- a/vernac/declareDef.ml
+++ b/vernac/declareDef.ml
@@ -43,8 +43,10 @@ module Hook = struct
end
(* Locality stuff *)
-let declare_definition ~name ~scope ~kind ?hook_data ?(should_suggest=false) udecl ce imps =
+let declare_definition ~name ~scope ~kind ?hook_data udecl ce imps =
let fix_exn = Declare.Internal.get_fix_exn ce in
+ let should_suggest = ce.Declare.proof_entry_opaque &&
+ Option.is_empty ce.Declare.proof_entry_secctx in
let dref = match scope with
| Discharge ->
let () = declare_variable ~name ~kind (SectionLocalDef ce) in