package GT
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=d23fb8e20ca28ec9ae07feee45b39aee8fb87ab11ec55211e2365f2c5a1c4ccf
sha512=0ade04e78a4d8e24acf24d3e4cdf358532d68284fa8e801b25bdf21c3c0483bb97d1350e86abcf9f93efec870b07f0f067a5dccae81686b14265baab3a4e7c13
doc/GT.View/View/index.html
Module View
Viewing values of various types.
Combinatorial interface
type er = Buffer.t -> unit
Type of the printer (to be referenced as View.er
).
type viewer = er
Synonym for unqualified reference.
val toString : viewer -> string
String conversion.
Primitive viewers
val empty : viewer
empty viewer
Viewers for built-in types
val unit : unit -> viewer
unit
viewer.
val string : string -> viewer
string
viewer.
val int : int -> viewer
int
viewer.
val float : float -> viewer
float
viewer.
val bool : bool -> viewer
bool
viewer.
val char : char -> viewer
char
viewer.
Some predefined string viewers
val semicolon : viewer
Semicolon ";"
.
val comma : viewer
Comma ","
.
val space : viewer
Space " "
.
val break : viewer
Break "\n"
.
Sequence combinators
Bracketing combinators
Functorial interface
module type Viewable = sig ... end
Signature to provide viewing function.
module type Concat = sig ... end
Signature to supply concatenation function.
Viewing lists of Viewable
types with explicit concatenation function.
Viewing arrays of Viewable
types with explicit concatenation function.
module SetC
(C : Concat)
(S : Set.S)
(V : Viewable with type t = S.elt) :
Viewable with type t = S.t
Viewing sets of Viewable
types with explicit concatenation function. Set items are ordered in according to their <b>string representations</b>.
module MapC
(C : Concat)
(M : Map.S)
(K : Viewable with type t = M.key)
(V : Viewable) :
Viewable with type t = V.t M.t
Viewing maps of Viewable
types with explicit concatenation function. Set items are ordered in according to their <b>string representations</b>.
module HashtblC
(C : Concat)
(M : Hashtbl.S)
(K : Viewable with type t = M.key)
(V : Viewable) :
Viewable with type t = V.t M.t
Viewing hash tables of Viewable
types with explicit concatenation function. Set items are ordered in according to their <b>string representations</b>.
Viewing lists of Viewable
types with concatenation with comma.
Viewing arrays of Viewable
types with concatenation with comma.
Viewing sets of Viewable
types with concatenation with comma. Set items are ordered in according to their <b>string representations</b>.
module Map
(M : Map.S)
(K : Viewable with type t = M.key)
(V : Viewable) :
Viewable with type t = V.t M.t
Viewing maps of Viewable
types with concatenation with comma. Set items are ordered in according to their <b>string representations</b>.
module Hashtbl
(M : Hashtbl.S)
(K : Viewable with type t = M.key)
(V : Viewable) :
Viewable with type t = V.t M.t
Viewing has htables of Viewable
types with concatenation with comma. Set items are ordered in according to their <b>string representations</b>.
Viewing named pairs. The first parameter supplies components names.
Wrappers to make builtin types viewable
Viewing helpers
Concatenation function: concatWithDelimiter x y delim
returns x ^ delim ^ y
if x is not empty and y
otherwise.