package osnap

  1. Overview
  2. Docs

Module Spec.Gen

include module type of QCheck.Gen
type !'a t = Random.State.t -> 'a
type !'a sized = int -> Random.State.t -> 'a
val return : 'a -> 'a t
val pure : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val ap : ('a -> 'b) t -> 'a t -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val map3 : ('a -> 'b -> 'c -> 'd) -> 'a t -> 'b t -> 'c t -> 'd t
val map4 : ('a -> 'b -> 'c -> 'd -> 'e) -> 'a t -> 'b t -> 'c t -> 'd t -> 'e t
val map5 : ('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t
val map_keep_input : ('a -> 'b) -> 'a t -> ('a * 'b) t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<$>) : ('a -> 'b) -> 'a t -> 'b t
val oneof : 'a t list -> 'a t
val oneof_list : 'a list -> 'a t
val oneofl : 'a list -> 'a t
  • deprecated Use [oneof_list] instead
val oneof_array : 'a array -> 'a t
val oneofa : 'a array -> 'a t
  • deprecated Use [oneof_array] instead
val oneof_weighted : (int * 'a t) list -> 'a t
val frequency : (int * 'a t) list -> 'a t
  • deprecated Use [oneof_weighted] instead
val oneof_list_weighted : (int * 'a) list -> 'a t
val frequencyl : (int * 'a) list -> 'a t
  • deprecated Use [oneof_list_weighted] instead
val oneof_array_weighted : (int * 'a) array -> 'a t
val frequencya : (int * 'a) array -> 'a t
  • deprecated Use [oneof_array_weighted] instead
val shuffle_array : 'a array -> 'a array t
val shuffle_a : 'a array -> unit t
  • deprecated Consider using [shuffle_array] instead
val shuffle_list : 'a list -> 'a list t
val shuffle_l : 'a list -> 'a list t
  • deprecated Use [shuffle_list] instead
val shuffle_list_weighted : (int * 'a) list -> 'a list t
val shuffle_w_l : (int * 'a) list -> 'a list t
  • deprecated Use [shuffle_list_weighted] instead
val range_subset : size:int -> int -> int -> int array t
val array_subset : int -> 'a array -> 'a array t
val unit : unit t
val bool : bool t
val float : float t
val float_pos : float t
val float_neg : float t
val pfloat : float t
  • deprecated Use [float_pos] instead
val nfloat : float t
  • deprecated Use [float_neg] instead
val float_bound_inclusive : float -> float t
val float_bound_exclusive : float -> float t
val float_range : float -> float -> float t
val (--.) : float -> float -> float t
val float_exp : float -> float t
val exponential : float -> float t
val nat : int t
val int_pos_mid : int t
val big_nat : int t
  • deprecated Use [map abs int] instead
val int_neg : int t
val neg_int : int t
  • deprecated Use [int_neg] or [map (fun i -> -i) nat] instead
val int_pos : int t
val pint : int t
  • deprecated Use [int_pos] instead
val int : int t
val int_small : int t
val int_pos_small : int t
val nat_small : int t
val small_nat : int t
  • deprecated Use [nat_small] instead
val small_int : int t
  • deprecated Use [nat_small] instead
val small_signed_int : int t
  • deprecated Use [int_small] instead
val int_bound : int -> int t
val int_range : int -> int -> int t
val graft_corners : 'a t -> 'a list -> unit -> 'a t
val int_pos_corners : int list
  • deprecated Define your own list of corner cases instead
val int_corners : int list
  • deprecated Define your own list of corner cases instead
val int_small_corners : unit -> int t
val (--) : int -> int -> int t
val int32 : int32 t
val int64 : int64 t
val ui32 : int32 t
  • deprecated Use [int32] instead
val ui64 : int64 t
  • deprecated Use [int64] instead
val list : 'a t -> 'a list t
val list_size : int t -> 'a t -> 'a list t
val list_repeat : int -> 'a t -> 'a list t
  • deprecated Use [list_size (return i) g] instead
val array : 'a t -> 'a array t
val array_size : int t -> 'a t -> 'a array t
val array_repeat : int -> 'a t -> 'a array t
  • deprecated Use [array_size (return i) g] instead
val option : ?ratio:float -> 'a t -> 'a option t
val opt : ?ratio:float -> 'a t -> 'a option t
  • deprecated Use [option] instead
val result : ?ratio:float -> 'a t -> 'e t -> ('a, 'e) result t
val char : char t
val char_printable : char t
val printable : char t
val char_numeral : char t
val numeral : char t
val char_range : char -> char -> char t
val bytes_size : ?gen:char t -> int t -> bytes t
val bytes_size_of : int t -> char t -> bytes t
val bytes : bytes t
val bytes_of : char t -> bytes t
val bytes_printable : bytes t
val bytes_small : bytes t
val bytes_small_of : char t -> bytes t
val string_size : ?gen:char t -> int t -> string t
val string_size_of : int t -> char t -> string t
val string : string t
val string_of : char t -> string t
val string_readable : string t
  • deprecated Use [string_printable] instead
val string_printable : string t
val small_string : ?gen:char t -> string t
  • deprecated Use [string_small] instead
val string_small : string t
val string_small_of : char t -> string t
val list_small : 'a t -> 'a list t
val small_list : 'a t -> 'a list t
  • deprecated Use [list_small] instead
val flatten_list : 'a t list -> 'a list t
val flatten_l : 'a t list -> 'a list t
  • deprecated Use [flatten_list] instead
val flatten_array : 'a t array -> 'a array t
val flatten_a : 'a t array -> 'a array t
  • deprecated Use [flatten_array] instead
val flatten_option : 'a t option -> 'a option t
val flatten_opt : 'a t option -> 'a option t
  • deprecated Use [flatten_option] instead
val flatten_result : ('a t, 'e) result -> ('a, 'e) result t
val flatten_res : ('a t, 'e) result -> ('a, 'e) result t
  • deprecated Use [flatten_result] instead
val array_small : 'a t -> 'a array t
val small_array : 'a t -> 'a array t
  • deprecated Use [array_small] instead
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val tup2 : 'a t -> 'b t -> ('a * 'b) t
val tup3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val tup4 : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val tup5 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t
val tup6 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> ('a * 'b * 'c * 'd * 'e * 'f) t
val tup7 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> 'g t -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) t
val 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
val 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
val join : 'a t t -> 'a t
val sized : 'a sized -> 'a t
val sized_size : int t -> 'a sized -> 'a t
val fix : (('a -> 'b t) -> 'a -> 'b t) -> 'a -> 'b t
val nat_split2 : int -> (int * int) t
val pos_split2 : int -> (int * int) t
val nat_split : size:int -> int -> int array t
val pos_split : size:int -> int -> int array t
val delay : (unit -> 'a t) -> 'a t
val (let+) : 'a t -> ('a -> 'b) -> 'b t
val (and+) : 'a t -> 'b t -> ('a * 'b) t
val (let*) : 'a t -> ('a -> 'b t) -> 'b t
val (and*) : 'a t -> 'b t -> ('a * 'b) t
val generate : ?rand:Random.State.t -> n:int -> 'a t -> 'a list
val generate1 : ?rand:Random.State.t -> 'a t -> 'a