Std_extra.Instances
Provides implementation for the common interface from Types
for most of OCaml's standard librairy types, as well as functors to combine them (e.g. create a module FooBar : TYPE with type t = Foo.t Bar.t
from a module Foo : TYPE
and a module Bar ; UNARY_TYPE
)
module Order : Types.TYPE with type t = Types.order
module Int : Types.TYPE with type t = int
module Bool : Types.TYPE with type t = bool
module Char : Types.TYPE with type t = char
module String : Types.TYPE with type t = string
module Instanciate
(T : Types.UNARY_TYPE)
(A : Types.TYPE) :
Types.TYPE with type t = A.t T.t
module Compose
(A : Types.UNARY_TYPE)
(B : Types.UNARY_TYPE) :
Types.UNARY_TYPE with type 'a t = 'a A.t B.t
module ComposePreMonad
(A : Types.PREMONAD)
(B : Types.PREMONAD) :
Types.PREMONAD with type 'a t = 'a A.t B.t
module UnaryOfPoly
(P : Types.POLY_TYPE) :
Types.UNARY_TYPE with type 'a t = 'a P.t
module TopBot : Types.MONAD with type 'a t = 'a topbot
module Option : Types.MONAD with type 'a t = 'a option
module List : Types.MONAD with type 'a t = 'a list
module Seq : Types.MONAD with type 'a t = 'a Stdlib.Seq.t
module Ref : Types.MONAD with type 'a t = 'a Stdlib.ref
module Array : Types.MONAD with type 'a t = 'a array
module Hcons : Types.UNARY_TYPE with type 'a t = 'a Hashconsing.hash_consed
module InstanciateHcons
(T : Types.PRINTABLE) :
Types.TYPE_TO_INT with type t = T.t Hashconsing.hash_consed
We can instanciate Hcons
with fewer paramters, since compare
, equal
and hash
are built-in and don't depend on T.compare
, T.equal
and T.hash
module InstanciateLeft
(T : Types.BINARY_TYPE)
(L : Types.TYPE) :
Types.UNARY_TYPE with type 'a t = (L.t, 'a) T.t
module InstanciateRight
(T : Types.BINARY_TYPE)
(R : Types.TYPE) :
Types.UNARY_TYPE with type 'a t = ('a, R.t) T.t
module InstanciateBoth
(T : Types.BINARY_TYPE)
(L : Types.TYPE)
(R : Types.TYPE) :
Types.TYPE with type t = (L.t, R.t) T.t
module ComposeLeft
(T : Types.BINARY_TYPE)
(L : Types.UNARY_TYPE) :
Types.BINARY_TYPE with type ('a, 'b) t = ('a L.t, 'b) T.t
module ComposeRight
(T : Types.BINARY_TYPE)
(R : Types.UNARY_TYPE) :
Types.BINARY_TYPE with type ('a, 'b) t = ('a, 'b R.t) T.t
module ComposeBinary
(T : Types.UNARY_TYPE)
(B : Types.BINARY_TYPE) :
Types.BINARY_TYPE with type ('a, 'b) t = ('a, 'b) B.t T.t
module Pair : Types.BINARY_TYPE with type ('a, 'b) t = 'a * 'b
module Either :
Types.BINARY_TYPE with type ('a, 'b) t = ('a, 'b) Stdlib.Either.t
module Result : Types.BINARY_TYPE with type ('a, 'b) t = ('a, 'b) Stdlib.result
module Lift (T : Types.TYPE) (I : sig ... end) : Types.TYPE with type t = I.t
module LiftUnary
(T : Types.UNARY_TYPE)
(I : sig ... end) :
Types.UNARY_TYPE with type 'a t = 'a I.t
module LiftBinary
(T : Types.BINARY_TYPE)
(I : sig ... end) :
Types.BINARY_TYPE with type ('a, 'b) t = ('a, 'b) I.t