package coq-core

  1. Overview
  2. Docs
The Coq Proof Assistant -- Core Binaries and Tools

Install

Dune Dependency

Authors

Maintainers

Sources

coq-8.19.2.tar.gz
md5=5d1187d5e44ed0163f76fb12dabf012e
sha512=91bc81530fa4f6498961583ad51eac5001f139881788b88e360a866ad8e2a6e2c5bce86d1a580ab4cd4782bf49d48318767df82471ce33ba3ac143e5569ad33c

doc/coq-core.engine/Logic_monad/NonLogical/index.html

Module Logic_monad.NonLogicalSource

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.

include Monad.S
include Monad.Def
type +'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>) : unit t -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t

The monadic laws must hold:

  • (x>>=f)>>=g = x>>=fun x' -> (f x'>>=g)
  • return a >>= f = f a
  • x>>=return = x

As well as the following identities:

  • x >> y = x >>= fun () -> y
  • map f x = x >>= fun x' -> f x'
module List : Monad.ListS with type 'a t := 'a t
Sourceval ignore : 'a t -> unit t
Sourcetype 'a ref
Sourceval ref : 'a -> 'a ref t

Pervasives.(:=)

Sourceval (:=) : 'a ref -> 'a -> unit t

Pervasives.(!)

Sourceval (!) : 'a ref -> 'a t
Sourceval read_line : string t
Sourceval print_char : char -> unit t
Sourceval print_debug : Pp.t -> unit t

Loggers. The buffer is also flushed.

Sourceval print_warning : Pp.t -> unit t
Sourceval print_notice : Pp.t -> unit t
Sourceval print_info : Pp.t -> unit t
Sourceval raise : Exninfo.iexn -> 'a t

Pervasives.raise. Except that exceptions are wrapped with Exception.

Sourceval catch : 'a t -> (Exninfo.iexn -> 'a t) -> 'a t

try ... with ... but restricted to Exception.

Sourceval timeout : float -> 'a t -> 'a option t
Sourceval make : (unit -> 'a) -> 'a t

Construct a monadified side-effect. Exceptions raised by the argument are wrapped with Exception.

Sourceval run : 'a t -> 'a

run performs effects.

OCaml

Innovation. Community. Security.