Skip to content

Refer people to QC's GenT type as a default implementation for MonadGen #25

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

Merged
merged 3 commits into from
Sep 13, 2020

Conversation

JordanMartinez
Copy link
Contributor

No description provided.

@hdgarrood
Copy link
Contributor

The only problem with this is that there's no GenT in quickcheck (yet). It ought to be fairly straightforward to put one together though: Gen is a newtype over State GenState, so GenT could be a newtype over StateT GenState and most of the existing code in QuickCheck hopefully wouldn't need much updating.

@hdgarrood
Copy link
Contributor

Whether or not a GenT in quickcheck exists, I think it would probably be best to point to quickcheck's Gen, since it's simpler than GenT. Also it might be good to clarify that this library deliberately only provides the class and no instances so that it's lightweight and so that libraries can provide functions for allowing random generation of any data types they provide without bringing in a (presumably heavier) dependency on any specific implementation. How about this in the readme:

Note that this library only provides the MonadGen type class; it does not provide any implementations of it. The intention is that libraries may depend on purescript-gen in order to provide functions for random generation of any data types they define while also keeping their dependency footprints minimal, and not tying users to any specific random generation library (since any library implementing random generation of values should be able to implement the MonadGen interface).

@JordanMartinez
Copy link
Contributor Author

I've updated the docs to refer to Gen rather than GenT. I've also added your comment in the readme. I think that's a good summary.

@hdgarrood hdgarrood merged commit b79a003 into master Sep 13, 2020
@hdgarrood hdgarrood deleted the addDocsAboutQC branch September 13, 2020 18:31
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.

2 participants