Proofview.NonLogical
The NonLogical
module allows the execution of effects (including I/O) in tactics (non-logical side-effects are not discarded at failures).
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 read_line : string t
val print_char : char -> unit t
val raise : Exninfo.iexn -> 'a t
Pervasives.raise
. Except that exceptions are wrapped with Exception
.
val catch : 'a t -> (Exninfo.iexn -> 'a t) -> 'a t
try ... with ...
but restricted to Exception
.
val make : (unit -> 'a) -> 'a t
Construct a monadified side-effect. Exceptions raised by the argument are wrapped with Exception
.
val run : 'a t -> 'a
run
performs effects.