Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Aug 18, 2021

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
Copy link
Contributor

vch9 commented Aug 20, 2021

👍

@jmid
Copy link
Collaborator Author

jmid commented Aug 20, 2021

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)

Copy link
Contributor

@sir4ur0n sir4ur0n left a comment

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
Copy link
Collaborator Author

jmid commented Nov 2, 2022

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