haskell-hedgehog icon indicating copy to clipboard operation
haskell-hedgehog copied to clipboard

Documentation on Range.linearFrom parameters

Open chris-martin opened this issue 8 years ago • 1 comments

linearFrom :: Integral a => a -> a -> a -> Range a

It isn't entirely clear to me what the first parameter does. Is it something like this?

linearFrom :: Integral a 
  => a -- ^ Value to shrink toward (the value produced when the size parameter is 0)
  -> a -- ^ Lower bound (the bottom of the range when the size parameter is 99)
  -> a -- ^ Upper bound (the top of the range when the size parameter is 99)
  -> Range a
data Range a =
  Range !a -- ^ Value to shrink toward (the value produced when the size parameter is zero)
        (Size -> (a, a))

chris-martin avatar Apr 11 '17 19:04 chris-martin

Yeah that's right, it's the value to shrink towards

jacobstanley avatar Apr 11 '17 22:04 jacobstanley