Skip to content

Commit

Permalink
fixing the failure behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalecha committed Apr 19, 2019
1 parent 25143e0 commit e5cb571
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/g_ltac_iter.ml4
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,20 @@ struct
++ pr_collection c)
in resolve_collection

let the_tactic combiner dbs tacK =
let the_tactic (combiner, unit) dbs tacK =
List.fold_right (fun db acc ->
resolve_collection combiner tacK acc false db)
dbs (Proofview.tclUNIT ())

let first_combiner a b =
Proofview.tclORELSE a (fun _ -> b)
let seq_combiner a b =
Proofview.tclBIND a (fun _ -> b)
let plus_combiner a b =
Proofview.tclOR a (fun _ -> b)
dbs unit

let first_combiner =
((fun a b -> Proofview.tclORELSE a (fun _ -> b)),
Tacticals.New.tclFAIL 0 Pp.(str "no applicable tactic"))
let seq_combiner =
((fun a b -> Proofview.tclBIND a (fun _ -> b)),
Proofview.tclUNIT ())
let plus_combiner =
((fun a b -> Proofview.tclOR a (fun _ -> b)),
Tacticals.New.tclFAIL 0 Pp.(str "no applicable tactic"))

end

Expand Down
6 changes: 6 additions & 0 deletions test-suite/example.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Goal False -> True -> 1 = 1 -> True.
first_of [ *|- ] k.
Defined.

Goal True -> False -> 1 = 1 -> False.
intros.
let k l := (apply l) in
first_of [ *|- ] k.
Defined.

Goal False -> True -> 1 = 1 -> True.
intros.
let k l := pose l in
Expand Down

0 comments on commit e5cb571

Please sign in to comment.