aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-07-31 18:33:06 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-09-23 18:23:04 +0200
commit6459c0e8c240f0997873c50d4ec749effaba2f44 (patch)
tree34890d4a1bba8fc2dc4e2e3230ea99ec36b437a3 /proofs
parente1146f44229b380a8f52c67e1a51df4d6c03086e (diff)
Removing the generalization of the body of inductive schemes from
Auto_ind_decl over the internal lemmas. The schemes are built in the main process and the internal lemmas are actually already also in the environment.
Diffstat (limited to 'proofs')
-rw-r--r--proofs/pfedit.ml4
-rw-r--r--proofs/pfedit.mli2
2 files changed, 3 insertions, 3 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml
index c77ab06b9..ceb4facc1 100644
--- a/proofs/pfedit.ml
+++ b/proofs/pfedit.ml
@@ -145,12 +145,12 @@ let build_constant_by_tactic id ctx sign ?(goal_kind = Global, false, Proof Theo
delete_current_proof ();
iraise reraise
-let build_by_tactic env ctx ?(poly=false) typ tac =
+let build_by_tactic ?(side_eff=true) env ctx ?(poly=false) typ tac =
let id = Id.of_string ("temporary_proof"^string_of_int (next())) in
let sign = val_of_named_context (named_context env) in
let gk = Global, poly, Proof Theorem in
let ce, status, univs = build_constant_by_tactic id ctx sign ~goal_kind:gk typ tac in
- let ce = Term_typing.handle_entry_side_effects env ce in
+ let ce = if side_eff then Term_typing.handle_entry_side_effects env ce else { ce with const_entry_body = Future.chain ~pure:true ce.const_entry_body (fun (pt, _) -> pt, Declareops.no_seff) } in
let (cb, ctx), se = Future.force ce.const_entry_body in
assert(Declareops.side_effects_is_empty se);
assert(Univ.ContextSet.is_empty ctx);
diff --git a/proofs/pfedit.mli b/proofs/pfedit.mli
index 5e0fb4dd3..4aa3c3bfd 100644
--- a/proofs/pfedit.mli
+++ b/proofs/pfedit.mli
@@ -153,7 +153,7 @@ val build_constant_by_tactic :
types -> unit Proofview.tactic ->
Entries.definition_entry * bool * Evd.evar_universe_context
-val build_by_tactic : env -> Evd.evar_universe_context -> ?poly:polymorphic ->
+val build_by_tactic : ?side_eff:bool -> env -> Evd.evar_universe_context -> ?poly:polymorphic ->
types -> unit Proofview.tactic ->
constr * bool * Evd.evar_universe_context