aboutsummaryrefslogtreecommitdiff
path: root/vernac/declareDef.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-07-02 13:51:49 +0200
committerGaëtan Gilbert2019-07-03 17:05:29 +0200
commit48a377680f4f3b96f7c19c22f5641877c561f03d (patch)
tree5d4e560f19910fcc68c536f0ba97df16c39d4e05 /vernac/declareDef.ml
parent4f0bdf2e19f0562a6cdf3b5ac075326b6e28c1d7 (diff)
Declare section variables in direct style "without" an object
The object was mostly for wrangling universes, but we already have the universe object for that. It's also used by some code which iterates over objects to find variables. Search used to do this but was changed in a previous commit. Prettyp.print_context and derivatives do this and I don't understand it enough to fix it, so I kept a dummy object around. It seems like a not very common used Print family (not documented AFAICT) so maybe we should remove it all instead.
Diffstat (limited to 'vernac/declareDef.ml')
-rw-r--r--vernac/declareDef.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/vernac/declareDef.ml b/vernac/declareDef.ml
index 4dcb3db63b..2aa96fa8ed 100644
--- a/vernac/declareDef.ml
+++ b/vernac/declareDef.ml
@@ -48,8 +48,9 @@ let declare_definition ~name ~scope ~kind ?hook_data udecl ce imps =
let fix_exn = Future.fix_exn_of ce.Proof_global.proof_entry_body in
let gr = match scope with
| Discharge ->
- let _ : Libobject.object_name =
- declare_variable ~name ~kind:Decls.(IsDefinition kind) (Lib.cwd(), SectionLocalDef ce) in
+ let () =
+ declare_variable ~name ~kind:Decls.(IsDefinition kind) (Lib.cwd(), SectionLocalDef ce)
+ in
VarRef name
| Global local ->
let kn = declare_constant ~name ~local ~kind:Decls.(IsDefinition kind) (DefinitionEntry ce) in