diff options
| -rw-r--r-- | lib/util.ml | 3 | ||||
| -rw-r--r-- | tactics/refine.ml | 2 | ||||
| -rw-r--r-- | test-suite/success/refine.v | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/lib/util.ml b/lib/util.ml index 9428aa134d..7df7063930 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -83,6 +83,9 @@ let rec is_sub gdzie gl gi co cl ci = (is_sub gdzie gl (gi+1) co cl (ci+1))) let rec raw_str_index i gdzie l c co cl = + (* First adapt to ocaml 3.11 new semantics of index_from *) + if (i+cl > l) then raise Not_found; + (* Then proceed as in ocaml < 3.11 *) let i' = String.index_from gdzie i c in if (i'+cl <= l) && (is_sub gdzie l i' co cl 0) then i' else raw_str_index (i'+1) gdzie l c co cl diff --git a/tactics/refine.ml b/tactics/refine.ml index c0db5def58..9225fd9d7c 100644 --- a/tactics/refine.ml +++ b/tactics/refine.ml @@ -275,7 +275,7 @@ let rec tcc_aux subst (TH (c,mm,sgp) as _th) gl = | Lambda (Name id,_,m), _ -> assert (isMeta (strip_outer_cast m)); begin match sgp with - | [None] -> introduction id gl + | [None] -> intro_mustbe_force id gl | [Some th] -> tclTHEN (introduction id) (onLastHyp (fun id -> tcc_aux (mkVar id::subst) th)) gl diff --git a/test-suite/success/refine.v b/test-suite/success/refine.v index 4b636618ad..b654277c8c 100644 --- a/test-suite/success/refine.v +++ b/test-suite/success/refine.v @@ -117,3 +117,8 @@ refine let fn := fact_rec (n-1) _ in n * fn). Abort. + +(* Wish 1988: that fun forces unfold in refine *) + +Goal (forall A : Prop, A -> ~~A). +Proof. refine(fun A a f => _). |
