sig
type (_, _) t
val bind : ('a -> ('p, 'b) t) -> ('p, 'a) t -> ('p, 'b) t
val pure : 'a -> ('p, 'a) t
val ap : ('p, 'a -> 'b) t -> (unit -> ('p, 'a) t) -> ('p, 'b) t
val map : ('a -> 'b) -> ('p, 'a) t -> ('p, 'b) t
val ( >|= ) : ('p, 'a) t -> ('a -> 'b) -> ('p, 'b) t
val replace : 'a -> ('p, 'b) t -> ('p, 'a) t
val void : ('p, 'a) t -> ('p, unit) t
val ap' : ('p, 'a -> 'b) t -> ('p, 'a) t -> ('p, 'b) t
val ( <*> ) : ('p, 'a -> 'b) t -> ('p, 'a) t -> ('p, 'b) t
val ( <~> ) : ('p, 'a -> 'b) t -> (unit -> ('p, 'a) t) -> ('p, 'b) t
val discard_left : ('p, 'a) t -> (unit -> ('p, 'b) t) -> ('p, 'b) t
val discard_right : ('p, 'a) t -> (unit -> ('p, 'b) t) -> ('p, 'a) t
val repeat : int -> ('p, 'a) t -> ('p, 'a list) t
val repeat_ : int -> ('p, 'a) t -> ('p, unit) t
val forever : ('p, 'a) t -> ('p, 'b) t
val ( >>= ) : ('p, 'a) t -> ('a -> ('p, 'b) t) -> ('p, 'b) t
val join : ('p, ('p, 'a) t) t -> ('p, 'a) t
val mcompose : ('b -> ('p, 'c) t) -> ('a -> ('p, 'b) t) -> 'a -> ('p, 'c) t
external run : ('s, 'a) t -> 's -> 's * 'a = "%identity"
external state : ('s -> 's * 'a) -> ('s, 'a) t = "%identity"
val get : ('s, 's) t
val gets : ('s -> 'a) -> ('s, 'a) t
val put : 's -> ('s, unit) t
val modify : ('s -> 's) -> ('s, unit) t
end