Module Logic_monad.BackState
val return : 'a -> ('a, 's, 's, 'e) t
val (>>=) : ('a, 'i, 'm, 'e) t -> ('a -> ('b, 'm, 'o, 'e) t) -> ('b, 'i, 'o, 'e) t
val (>>) : (unit, 'i, 'm, 'e) t -> ('b, 'm, 'o, 'e) t -> ('b, 'i, 'o, 'e) t
val map : ('a -> 'b) -> ('a, 'i, 'o, 'e) t -> ('b, 'i, 'o, 'e) t
val ignore : ('a, 'i, 'o, 'e) t -> (unit, 'i, 'o, 'e) t
val set : 'o -> (unit, 'i, 'o, 'e) t
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 functionssrc
anddst
. To ensure a meaningful result, those functions must form a retraction, i.e.dst (src e1) = e1
for alle1
. This is typically the case when the type'e1
isunit
.
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
val split : ('a, 's, 's, 'e) t -> (('a, ('a, 'i, 's, 'e) t, 'e) list_view, 's, 's, 'e) t
val once : ('a, 'i, 'o, 'e) t -> ('a, 'i, 'o, 'e) t
val break : ('e -> 'e option) -> ('a, 'i, 'o, 'e) t -> ('a, 'i, 'o, 'e) t
val lift : 'a NonLogical.t -> ('a, 's, 's, 'e) t