# Module `Quickcheck.Shrinker`

`type 'a t`

`= 'a Base_quickcheck.Shrinker.t`

`val shrink : 'a t -> 'a -> 'a Sequence.t`

`val create : ('a -> 'a Sequence.t) -> 'a t`

`val empty : Core_kernel__.Import.unit -> 'a t`

`val bool : Core_kernel__.Import.bool t`

`val char : Core_kernel__.Import.char t`

`val map : 'a t -> f:('a -> 'b) -> f_inverse:('b -> 'a) -> 'b t`

`val filter : 'a t -> f:('a -> Core_kernel__.Import.bool) -> 'a t`

`val filter_map : 'a t -> f:('a -> 'b Core_kernel__.Import.option) -> f_inverse:('b -> 'a) -> 'b t`

Filters and maps according to

`f`

, and provides input to`t`

via`f_inverse`

. Only the`f`

direction produces options, intentionally.

`val tuple2 : 'a t -> 'b t -> ('a * 'b) t`

`val tuple3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t`

`val tuple4 : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t`

`val tuple5 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t`

`val tuple6 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> ('a * 'b * 'c * 'd * 'e * 'f) t`

`val variant2 : 'a t -> 'b t -> [ `A of 'a | `B of 'b ] t`

`val variant3 : 'a t -> 'b t -> 'c t -> [ `A of 'a | `B of 'b | `C of 'c ] t`

`val variant4 : 'a t -> 'b t -> 'c t -> 'd t -> [ `A of 'a | `B of 'b | `C of 'c | `D of 'd ] t`

`val variant5 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> [ `A of 'a | `B of 'b | `C of 'c | `D of 'd | `E of 'e ] t`

`val variant6 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> 'f t -> [ `A of 'a | `B of 'b | `C of 'c | `D of 'd | `E of 'e | `F of 'f ] t`

`val fixed_point : ('a t -> 'a t) -> 'a t`

`fixed_point`

assists with shrinking structures recursively. Its advantage over directly using`rec`

in the definition of the shrinker is that it causes lazy evaluation where possible.