package qcheck-core

  1. Overview
  2. Docs

Module QCheck.PrintSource

The Print module offers combinators for printing generated values.

Sourcetype 'a t = 'a -> string

Printer for values of type 'a.

Sourceval unit : unit t

unit is a printer of unit.

  • since 0.6
Sourceval int : int t

Integer printer.

Sourceval int32 : int32 t

32-bit integer printer.

  • since 0.24
Sourceval int64 : int64 t

64-bit integer printer.

  • since 0.24
Sourceval bool : bool t

Boolean printer.

Sourceval float : float t

Floating point number printer.

Sourceval char : char t

Character printer.

Sourceval bytes : bytes t

Bytes printer.

  • since 0.20
Sourceval string : string t

String printer.

Sourceval option : 'a t -> 'a option t

Option printer.

Sourceval result : 'a t -> 'e t -> ('a, 'e) result t

Result printer.

  • since 0.24
Sourceval pair : 'a t -> 'b t -> ('a * 'b) t

Pair printer. Expects printers for each component.

Sourceval triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t

Triple (3-tuple) printer. Expects printers for each component.

Sourceval quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t

Quadruple (4-tuple) printer. Expects printers for each component.

Sourceval list : 'a t -> 'a list t

List printer. Expects a printer for the list element type.

Sourceval array : 'a t -> 'a array t

Array printer. Expects a printer for the array entry type.

Sourceval comap : ('a -> 'b) -> 'b t -> 'a t

comap f p maps p, a printer of type 'b, to a printer of type 'a by first converting a printed value using f : 'a -> 'b.

Sourceval tup2 : 'a t -> 'b t -> ('a * 'b) t

2-tuple printer. Expects printers for each component.

Sourceval tup3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t

3-tuple printer. Expects printers for each component.

Sourceval tup4 : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t

4-tuple printer. Expects printers for each component.

Sourceval tup5 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t

5-tuple printer. Expects printers for each component.

Sourceval tup6 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> ('a * 'b * 'c * 'd * 'e * 'f) t

6-tuple printer. Expects printers for each component.

Sourceval tup7 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> 'g t -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) t

7-tuple printer. Expects printers for each component.

Sourceval tup8 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> 'g t -> 'h t -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h) t

8-tuple printer. Expects printers for each component.

Sourceval tup9 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> 'g t -> 'h t -> 'i t -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i) t

9-tuple printer. Expects printers for each component.

OCaml

Innovation. Community. Security.