Skip to content

Fix QCheck2.Gen.small_string impl to match interface and documentation#161

Closed
jmid wants to merge 1 commit into
c-cube:masterfrom
jmid:QCheck2.Gen.small_string-signature
Closed

Fix QCheck2.Gen.small_string impl to match interface and documentation#161
jmid wants to merge 1 commit into
c-cube:masterfrom
jmid:QCheck2.Gen.small_string-signature

Conversation

@jmid

@jmid jmid commented Aug 18, 2021

Copy link
Copy Markdown
Collaborator

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.
  *)

@vch9

vch9 commented Aug 20, 2021

Copy link
Copy Markdown
Contributor

👍

@jmid

jmid commented Aug 20, 2021

Copy link
Copy Markdown
Collaborator Author

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)

@sir4ur0n sir4ur0n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it doesn't solve the "optional mandatory" argument design issue you mentioned, it doesn't hurt in any way, so it's still positive 👍

@jmid

jmid commented Nov 2, 2022

Copy link
Copy Markdown
Collaborator Author

Closing as this is addressed in #245

@jmid jmid closed this Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants