diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-05-07 16:53:03 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-05-07 16:53:03 +0200 |
commit | a29c35cee2710540fc4e0465cfd2bc08835c12f8 (patch) | |
tree | e14ef42792c74aa8f63245e4eb56d16e02382e6a /engine/logic_monad.mli | |
parent | 87c8236de9a8141ea6925cf4390a971f0a941ae8 (diff) |
Adding a primitive to the tactic monad to modify the exceptional content.
Diffstat (limited to 'engine/logic_monad.mli')
-rw-r--r-- | engine/logic_monad.mli | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engine/logic_monad.mli b/engine/logic_monad.mli index 42e49d5a7..1869f3263 100644 --- a/engine/logic_monad.mli +++ b/engine/logic_monad.mli @@ -115,6 +115,13 @@ module BackState : sig val get : ('s, 's, 's, 'e) t val modify : ('i -> 'o) -> (unit, 'i, 'o, 'e) t + val interleave : ('e1 -> 'e2) -> ('e2 -> 'e1) -> ('a, 'i, 'o, 'e1) t -> + ('a, 'i, 'o, 'e2) t + (** [interleave src dst m] adapts the exceptional content of the monad + according to the functions [src] and [dst]. To ensure a meaningful result, + those functions must form a retraction, i.e. [dst (src e1) = e1] for all + [e1]. This is typically the case when the type ['e1] is [unit]. *) + val zero : 'e -> ('a, 'i, 'o, 'e) t val plus : ('a, 'i, 'o, 'e) t -> ('e -> ('a, 'i, 'o, 'e) t) -> ('a, 'i, 'o, 'e) t |