aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine/logic_monad.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-05-07 16:53:03 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-05-07 16:53:03 +0200
commita29c35cee2710540fc4e0465cfd2bc08835c12f8 (patch)
treee14ef42792c74aa8f63245e4eb56d16e02382e6a /engine/logic_monad.ml
parent87c8236de9a8141ea6925cf4390a971f0a941ae8 (diff)
Adding a primitive to the tactic monad to modify the exceptional content.
Diffstat (limited to 'engine/logic_monad.ml')
-rw-r--r--engine/logic_monad.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/engine/logic_monad.ml b/engine/logic_monad.ml
index 79bf48acd..c88de133d 100644
--- a/engine/logic_monad.ml
+++ b/engine/logic_monad.ml
@@ -215,6 +215,14 @@ struct
let modify f =
{ iolist = fun s nil cons -> cons () (f s) nil }
+ (** Exception manipulation *)
+
+ let interleave src dst m =
+ { iolist = fun s nil cons ->
+ m.iolist s (fun e1 -> nil (src e1))
+ (fun x s next -> cons x s (fun e2 -> next (dst e2)))
+ }
+
(** List observation *)
let once m =