Module Logic_monad.NonLogical
The non-logical monad is a simple unit -> 'a (i/o) monad. The operations are simple wrappers around corresponding usual operations and require little documentation.
val (!) : 'a ref -> 'a tval read_line : string tval print_char : char -> unit tval print_debug : Pp.t -> unit tLoggers. The buffer is also flushed.
val print_warning : Pp.t -> unit tval print_notice : Pp.t -> unit tval print_info : Pp.t -> unit tval raise : Exninfo.iexn -> 'a tPervasives.raise. Except that exceptions are wrapped withException.
val catch : 'a t -> (Exninfo.iexn -> 'a t) -> 'a ttry ... with ...but restricted toException.
val timeout : int -> 'a t -> 'a tval make : (unit -> 'a) -> 'a tConstruct a monadified side-effect. Exceptions raised by the argument are wrapped with
Exception.
val run : 'a t -> 'arunperforms effects.