diff options
| author | Matthieu Sozeau | 2015-01-13 07:09:05 +0530 |
|---|---|---|
| committer | Matthieu Sozeau | 2015-01-13 07:09:05 +0530 |
| commit | 74682bb27da074fedc115238f3085baaccf12d73 (patch) | |
| tree | 3d8a70616ae17fe27e960fc38bf1c9d799131e87 | |
| parent | 9993ac283e14c0f789b9fa826fd20086059cdcd8 (diff) | |
TCs: Properly handle Hint Extern with conclusions of the form _ -> _
in typeclasses eauto, remaining compatible with eauto and still
producing eta-reduced applications for Hint Resolves. Fixes bug #3794.
| -rw-r--r-- | tactics/class_tactics.ml | 10 | ||||
| -rw-r--r-- | test-suite/bugs/closed/3794.v | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/tactics/class_tactics.ml b/tactics/class_tactics.ml index 85c014ea5d..44204a9f0e 100644 --- a/tactics/class_tactics.ml +++ b/tactics/class_tactics.ml @@ -152,8 +152,8 @@ let rec e_trivial_fail_db db_list local_db goal = in tclFIRST (List.map tclCOMPLETE tacl) goal -and e_my_find_search db_list local_db hdc complete sigma concl = - let prods, concl = decompose_prod_assum concl in +and e_my_find_search db_list local_db hdc complete sigma oconcl = + let prods, concl = decompose_prod_assum oconcl in let nprods = List.length prods in let freeze = try @@ -168,8 +168,8 @@ and e_my_find_search db_list local_db hdc complete sigma concl = (fun db -> let tacs = if Hint_db.use_dn db then (* Using dnet *) - Hint_db.map_eauto hdc concl db - else Hint_db.map_existential hdc concl db + Hint_db.map_eauto hdc oconcl db + else Hint_db.map_existential hdc oconcl db in let flags = auto_unif_flags freeze (Hint_db.transparent_state db) in List.map (fun x -> (flags, x)) tacs) @@ -187,7 +187,7 @@ and e_my_find_search db_list local_db hdc complete sigma concl = (if complete then tclIDTAC else e_trivial_fail_db db_list local_db) | Unfold_nth c -> tclWEAK_PROGRESS (unfold_in_concl [AllOccurrences,c]) | Extern tacast -> - Proofview.V82.of_tactic (conclPattern concl p tacast) + Proofview.V82.of_tactic (conclPattern oconcl p tacast) in let tac = if complete then tclCOMPLETE tac else tac in match t with diff --git a/test-suite/bugs/closed/3794.v b/test-suite/bugs/closed/3794.v new file mode 100644 index 0000000000..6963d81c14 --- /dev/null +++ b/test-suite/bugs/closed/3794.v @@ -0,0 +1,6 @@ +Hint Extern 10 ((?X = ?Y) -> False) => intros; discriminate. +Hint Unfold not : core. + +Goal true<>false. +typeclasses eauto with core. +Qed.
\ No newline at end of file |
