qcheck icon indicating copy to clipboard operation
qcheck copied to clipboard

Fix `QCheck2.Gen.small_string` impl to match interface and documentation

Open jmid opened this issue 4 years ago • 2 comments

This PR updates the QCheck2.Gen.small_string to match the interface and documentation following my finding in #153:

  val small_string : ?gen:char t -> string t
  (** Builds a string generator, length is {!small_nat}.
      Accepts an optional character generator (the default is {!char}).

      Shrinks on the number of characters first, then on the characters.
  *)

jmid avatar Aug 18 '21 15:08 jmid

:+1:

vch9 avatar Aug 20 '21 08:08 vch9

It is nice to align the .ml and .mli for consistency. However, as far as I can tell (see examples and discussion in #162) this still means that the parameter is defacto labelled - and thus required. Merging this fix does not change that - meaning the documentation+interface should be updated 😬🤷‍♂️ As such I'm hesitant with the merge, because we will have to make some additional changes anyway...

I'd therefore like your input on the discussion in #162 @vch9 @sir4ur0n @c-cube (I'd also be grateful if one of you would confirm by cloning, running dune utop and pasting the examples)

jmid avatar Aug 20 '21 09:08 jmid

Closing as this is addressed in #245

jmid avatar Nov 02 '22 20:11 jmid