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

GenDefault class to derive generators #61

Merged
merged 2 commits into from Aug 9, 2023

Conversation

ejconlon
Copy link
Contributor

@ejconlon ejconlon commented Jun 6, 2023

Implements the design in #49 . Defines GenDefault class to derive generators with support for user-defined tags to select implementations. Also includes various DerivingVia helpers.

@edsko
Copy link
Collaborator

edsko commented Aug 8, 2023

Apologies for the slow reaction, I've been so busy. But this is really nice work! I like it. Thank you for your attention to detail. I think the only thing we should consider how we could make Test.Falsify.Generator.Default and Test.Falsify.Generator.Tag not be siblings, but instead clarify in the module hierarchy that one is an instance of the other. Perhaps Test.Falsify.Generator.Default and Test.Falsify.Generator.Default.Falsify? That double Falsify is a tad annoying but it does make sense. Maybe even Test.Falsify.GenDefault and Test.Falsify.GenDefault.Falsify`?

Alternatively, maybe, Test.Falsify.Generator.ClassBased and Test.Falsify.Generator.ClassBased.Default? That's perhaps a little cleaner, what do you think?

But once we resolve that, this is ready to merge. Sorry again for the delay!

@ejconlon
Copy link
Contributor Author

ejconlon commented Aug 8, 2023

@edsko You presented a few good options. What do you think about Test.Falsify.GenDefault and Test.Falsify.GenDefault.Std? We can change the name of the default tag to Std as well, to indicate that this is the standard set of generators. These are short module names that match their contents, so I think they will be easy for people to remember.

@edsko
Copy link
Collaborator

edsko commented Aug 9, 2023

Yes, I like it :) Thank you!

@edsko edsko merged commit 166c9ab into well-typed:main Aug 9, 2023
7 checks passed
@ejconlon ejconlon deleted the ejconlon/default branch August 9, 2023 16:44
@ejconlon
Copy link
Contributor Author

ejconlon commented Aug 9, 2023

@edsko Oops, forgot to add to exposed modules! (I use hpack for everything else...) #64

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.

None yet

2 participants