-
Notifications
You must be signed in to change notification settings - Fork 30
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
Generalized formatting of generated values #326
Comments
I am not convinced that this is the right approach. My first impression is that we should make a change like that to How does Haskell-Hedgehog solve this problem? |
Gen would have better knowledge of the
They probably just use type classes, like |
I'm thinking about the interplay between Also, would it be reasonable to eventually add ...and if so, how would we explain to users why they're on |
Following a quick discussion from #324, this issue is being created to provide generalized formatting for values from a
Gen<'a>
.Ideally, we'd change the
Gen<'a>
type to be a record, and add aformatter
field that looks like'a -> string
. To maintain compatibility, this field should have a default value ofsprintf "%A"
. Another function should be exposed to override this default,withFormatter : ('a -> string) -> Gen<'a> -> Gen<'a>
.Any values from a generator that are formatted should use the provided formatter.
The text was updated successfully, but these errors were encountered: