diff options
| author | Emilio Jesus Gallego Arias | 2020-06-22 20:42:39 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-06-26 14:38:12 +0200 |
| commit | ea8b9e060dfba9cc8706677e29c26dabaaa87551 (patch) | |
| tree | 6e1d1b6c35c8d508f022d37db93e5eef4a54d5a8 /plugins/ltac | |
| parent | 862e5a0f13e51b51d42041f36576a2c7f07a9d5e (diff) | |
[declare] Improve organization of proof/constant information.
We unify information about constants so it is shared among all the
paths [interactive, NI, obligations].
IMHO the current setup looks pretty good, with information split into
a per-constant record `CInfo.t` and variables affecting mutual
definitions at once, which live in `Info.t`.
Main information outside our `Info` record is `opaque`, which is
provided at different moments in several cases.
There are a few nits regarding interactive proofs, which will go away
in the next commits.
Diffstat (limited to 'plugins/ltac')
| -rw-r--r-- | plugins/ltac/rewrite.ml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/ltac/rewrite.ml b/plugins/ltac/rewrite.ml index 405fe7b844..f16d0717df 100644 --- a/plugins/ltac/rewrite.ml +++ b/plugins/ltac/rewrite.ml @@ -1902,9 +1902,10 @@ let declare_projection name instance_id r = let types = Some (it_mkProd_or_LetIn typ ctx) in let kind, opaque, scope = Decls.(IsDefinition Definition), false, Locality.Global Locality.ImportDefaultBehavior in let impargs, udecl = [], UState.default_univ_decl in - let info = Declare.CInfo.make ~scope ~kind ~opaque ~impargs ~udecl ~poly () in + let cinfo = Declare.CInfo.make ~name ~impargs ~typ:types () in + let info = Declare.Info.make ~scope ~kind ~udecl ~poly () in let _r : GlobRef.t = - Declare.declare_definition ~name ~info ~types ~body sigma + Declare.declare_definition ~cinfo ~info ~opaque ~body sigma in () let build_morphism_signature env sigma m = @@ -1997,10 +1998,11 @@ let add_morphism_interactive atts m n : Declare.Proof.t = | _ -> assert false in let hook = Declare.Hook.make hook in - let info = Declare.Info.make ~hook ~kind () in Flags.silently (fun () -> - let lemma = Declare.Proof.start ~name:instance_id ~poly ~info ~impargs:[] evd morph in + let cinfo = Declare.CInfo.make ~name:instance_id ~typ:morph () in + let info = Declare.Info.make ~poly ~hook ~kind () in + let lemma = Declare.Proof.start ~cinfo ~info evd in fst (Declare.Proof.by (Tacinterp.interp tac) lemma)) () let add_morphism atts binders m s n = |
