From 86002ce6e6fb3cbf1f5c9bf3657c13b4e79be192 Mon Sep 17 00:00:00 2001 From: herbelin Date: Mon, 20 Sep 2010 21:59:57 +0000 Subject: Added eta-expansion in kernel, type inference and tactic unification, governed in the latter case by a flag since (useful e.g. for setoid rewriting which otherwise loops as it is implemented). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13443 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tactics/auto.ml | 1 + tactics/class_tactics.ml4 | 3 ++- tactics/equality.ml | 1 + tactics/rewrite.ml4 | 3 +++ tactics/tactics.ml | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tactics') diff --git a/tactics/auto.ml b/tactics/auto.ml index 328e2d6e32..fbdf8683ee 100644 --- a/tactics/auto.ml +++ b/tactics/auto.ml @@ -756,6 +756,7 @@ let auto_unif_flags = { modulo_delta = empty_transparent_state; resolve_evars = true; use_evars_pattern_unification = false; + modulo_eta = true } (* Try unification with the precompiled clause, then use registered Apply *) diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4 index 0cc39a2bba..cb52ec5b91 100644 --- a/tactics/class_tactics.ml4 +++ b/tactics/class_tactics.ml4 @@ -96,6 +96,7 @@ let auto_unif_flags = { modulo_delta = var_full_transparent_state; resolve_evars = false; use_evars_pattern_unification = true; + modulo_eta = true } let rec eq_constr_mod_evars x y = @@ -144,7 +145,7 @@ let with_prods nprods (c, clenv) f gls = let flags_of_state st = {auto_unif_flags with - modulo_conv_on_closed_terms = Some st; modulo_delta = st} + modulo_conv_on_closed_terms = Some st; modulo_delta = st; modulo_eta = false} let rec e_trivial_fail_db db_list local_db goal = let tacl = diff --git a/tactics/equality.ml b/tactics/equality.ml index a4e2b510fd..281bd39bc3 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -86,6 +86,7 @@ let rewrite_unif_flags = { Unification.modulo_delta = empty_transparent_state; Unification.resolve_evars = true; Unification.use_evars_pattern_unification = true; + Unification.modulo_eta = true } let side_tac tac sidetac = diff --git a/tactics/rewrite.ml4 b/tactics/rewrite.ml4 index 4524cf0dae..f79bfa0ff7 100644 --- a/tactics/rewrite.ml4 +++ b/tactics/rewrite.ml4 @@ -297,6 +297,7 @@ let rewrite_unif_flags = { Unification.modulo_delta = empty_transparent_state; Unification.resolve_evars = true; Unification.use_evars_pattern_unification = true; + Unification.modulo_eta = true } let conv_transparent_state = (Idpred.empty, Cpred.full) @@ -307,6 +308,7 @@ let rewrite2_unif_flags = { Unification.modulo_delta = empty_transparent_state; Unification.resolve_evars = true; Unification.use_evars_pattern_unification = true; + Unification.modulo_eta = true } let setoid_rewrite_unif_flags = { @@ -315,6 +317,7 @@ let setoid_rewrite_unif_flags = { Unification.modulo_delta = conv_transparent_state; Unification.resolve_evars = true; Unification.use_evars_pattern_unification = true; + Unification.modulo_eta = true } let convertible env evd x y = diff --git a/tactics/tactics.ml b/tactics/tactics.ml index b9cea418d8..4a30010658 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -729,6 +729,7 @@ let elim_flags = { modulo_delta = empty_transparent_state; resolve_evars = false; use_evars_pattern_unification = true; + modulo_eta = true } let elimination_clause_scheme with_evars allow_K i elimclause indclause gl = -- cgit v1.2.3