aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/elimschemes.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-05-09 22:14:35 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-06-06 12:58:57 +0200
commit954fbd3b102060ed1e2122f571a430f05a174e42 (patch)
treea6f3db424624eae05ded3be6a84357d1ad291eda /tactics/elimschemes.ml
parent2f23c27e08f66402b8fba4745681becd402f4c5c (diff)
Remove the Sigma (monotonous state) API.
Reminder of (some of) the reasons for removal: - Despite the claim in sigma.mli, it does *not* prevent evar leaks, something like: fun env evd -> let (evd',ev) = new_evar env evd in (evd,ev) will typecheck even with Sigma-like type annotations (with a proof of reflexivity) - The API stayed embryonic. Even typing functions were not ported to Sigma. - Some unsafe combinators (Unsafe.tclEVARS) were replaced with slightly less unsafe ones (e.g. s_enter), but those ones were not marked unsafe at all (despite still being so). - There was no good story for higher order functions manipulating evar maps. Without higher order, one can most of the time get away with reusing the same name for the updated evar map. - Most of the code doing complex things with evar maps was using unsafe casts to sigma. This code should be fixed, but this is an orthogonal issue. Of course, this was showing a nice and elegant use of GADTs, but the cost/benefit ratio in practice did not seem good.
Diffstat (limited to 'tactics/elimschemes.ml')
-rw-r--r--tactics/elimschemes.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/tactics/elimschemes.ml b/tactics/elimschemes.ml
index 93073fdc7..466b1350d 100644
--- a/tactics/elimschemes.ml
+++ b/tactics/elimschemes.ml
@@ -18,7 +18,6 @@ open Indrec
open Declarations
open Typeops
open Ind_tables
-open Sigma.Notations
(* Induction/recursion schemes *)
@@ -109,10 +108,10 @@ let rec_dep_scheme_kind_from_type =
let build_case_analysis_scheme_in_type dep sort ind =
let env = Global.env () in
- let sigma = Sigma.Unsafe.of_evar_map (Evd.from_env env) in
- let Sigma (indu, sigma, _) = Sigma.fresh_inductive_instance env sigma ind in
- let Sigma (c, sigma, _) = build_case_analysis_scheme env sigma indu dep sort in
- c, Evd.evar_universe_context (Sigma.to_evar_map sigma)
+ let sigma = Evd.from_env env in
+ let (sigma, indu) = Evd.fresh_inductive_instance env sigma ind in
+ let (sigma, c) = build_case_analysis_scheme env sigma indu dep sort in
+ c, Evd.evar_universe_context sigma
let case_scheme_kind_from_type =
declare_individual_scheme_object "_case_nodep"