aboutsummaryrefslogtreecommitdiff
path: root/proofs/proofview_gen.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-07-26 21:33:22 +0200
committerPierre-Marie Pédrot2014-07-28 19:59:19 +0200
commit88b66654ed4face382cf2c164b6f2f6301fc323d (patch)
treead917b352451399cef9eff1ff247d9d5e1368ff3 /proofs/proofview_gen.ml
parent3f2ea14ddc95528ac514fa4a7bb7022407891ce1 (diff)
Adding a tclBREAK primitive to the tactic monad.
Diffstat (limited to 'proofs/proofview_gen.ml')
-rw-r--r--proofs/proofview_gen.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/proofs/proofview_gen.ml b/proofs/proofview_gen.ml
index 9ed3f4bd02..90b730198b 100644
--- a/proofs/proofview_gen.ml
+++ b/proofs/proofview_gen.ml
@@ -142,6 +142,12 @@ module Logical =
let m = m s in
{ iolist = fun nil cons -> m.iolist nil (fun x _ -> cons x nil) }
+ let break (f : exn -> bool) (m : 'a tactic) : 'a tactic = (); fun s ->
+ let m = m s in
+ { iolist = fun nil cons ->
+ m.iolist nil (fun x next -> cons x (fun e -> if f e then nil e else next e))
+ }
+
type 'a reified = ('a, exn -> 'a reified) list_view IO.t
let rec reflect (m : 'a reified) : 'a iolist =