Idris2Doc : Hedgehog.Internal.Shrink

Hedgehog.Internal.Shrink

(source)

Definitions

halvesInteger : Integer->ColistInteger
Totality: total
Visibility: public export
halves : ToIntegera=>a->Colista
Totality: total
Visibility: public export
towardsInteger : Integer->Integer->ColistInteger
Totality: total
Visibility: public export
towards : ToIntegera=>a->a->Colista
  Shrink an integral number by edging towards a destination.

>>> towards 0 100
[0,50,75,88,94,97,99]

>>> towards 500 1000
[500,750,875,938,969,985,993,997,999]

>>> towards (-50) (-26)
[-50,-38,-32,-29,-27]

Note we always try the destination first, as that is the optimal shrink.

Totality: total
Visibility: public export
towardsDouble : Double->Double->ColistDouble
Totality: total
Visibility: public export
removes : Nat->Lista->Colist (Lista)
Totality: total
Visibility: public export
splits : (a->b) ->Lista->List (Lista, (b, Lista))
  All ways a list can be split

Note: The first list in the triple will be in reverse order

Totality: total
Visibility: public export
list : Nat->Lista->Colist (Lista)
  Shrink a list by edging towards the empty list.

>>> list [1,2,3]
[[],[2,3],[1,3],[1,2]]

>>> list "abcd"
["","cd","ab","bcd","acd","abd","abc"]

Note we always try the empty list first, as that is the optimal shrink.

Totality: total
Visibility: public export
interleave : Nat->List (Cotreea) ->Cotree (Lista)
Totality: total
Visibility: public export