diff options
| author | Pierre-Marie Pédrot | 2014-07-26 21:33:22 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-07-28 19:59:19 +0200 |
| commit | 88b66654ed4face382cf2c164b6f2f6301fc323d (patch) | |
| tree | ad917b352451399cef9eff1ff247d9d5e1368ff3 /proofs/proofview_gen.ml | |
| parent | 3f2ea14ddc95528ac514fa4a7bb7022407891ce1 (diff) | |
Adding a tclBREAK primitive to the tactic monad.
Diffstat (limited to 'proofs/proofview_gen.ml')
| -rw-r--r-- | proofs/proofview_gen.ml | 6 |
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 = |
