Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Osnap.Spec
Sourceinclude module type of Spec
'a gen
is used to generate random values inside spec
. QCheck combinators are available using Spec.Gen
.
'a printer
is used to store randomly generated values
'a encoding
is used to encode values in memory
type 'a spec = {
gen : 'a gen;
printer : 'a printer option;
encoding : 'a Data_encoding.t option;
}
'a spec
combines an 'a gen
and a printer
t
is the specification type, describing a function. Thus t
declaration must end with (^>>)
.
default_printer printer
creates a default printer if printer
is absent
build ?printer ?encoding gen
builds an 'a spec
with optional fields
(^>) x y
combines spec x
and y
to create x -> y
(^>>) x res
combines a specification and printer for the result type