Source

ocaml-logicm / logicM_cps.mli

module type Monad =
  sig
    type 'a m
    val return : 'a -> 'a m
    val bind : ('a -> 'b m) -> 'a m -> 'b m
  end

module LogicT :
  functor (M : Monad) ->
    sig
      type 'a m
      val return : 'a -> 'a m
      val bind : ('a -> 'b m) -> 'a m -> 'b m
      val mzero : 'a m

      val mplusl : 'a m -> 'a m Lazy.t -> 'a m
      val mplus : 'a m -> 'a m -> 'a m
      val interleave : 'a m -> 'a m -> 'a m
      val ( <+> ) : 'a m -> 'a m -> 'a m

      val lift : 'a M.m -> 'a m
      val liftl : 'a M.m Lazy.t -> 'a m

      val reflect : ('a * 'a m) option -> 'a m
      val msplit : 'a m -> ('a * 'a m) option m
      val once : 'a m -> 'a m
      val destruct_bindu :
        'a m -> ('a -> 'a m -> 'b m) -> (unit -> 'b m) -> 'b m
      val destruct_bind :
        'a m -> ('a -> 'a m -> 'b m) -> 'b m -> 'b m
      val ifteu : 'a m -> ('a -> 'b m) -> (unit -> 'b m) -> 'b m
      val guard : bool -> unit m
      val ( >>= ) : 'a m -> ('a -> 'b m) -> 'b m


      val bagof : int option -> 'a m -> 'a list m
      val observe : 'a m -> 'a option
      val runL : int option -> 'a m -> 'a list
      val from_stream : 'a ExtStream.Stream.t -> 'a m
      val filter : ('a -> bool) -> 'a m -> 'a m
      val ifm : 'a m -> th:('a m -> 'b) -> el:(unit -> 'b) -> 'b

      val impl_name : string
    end