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

Show instances produce output which is not lexically valid Haskell 98 #48

Open
jacobstanley opened this issue Jun 27, 2016 · 1 comment

Comments

@jacobstanley
Copy link

This breaks tools like pretty-show as they can't parse the output.

It would be great if, for example, Day produced output like Day 2016 12 31 so that these tools work properly.

Even if we quote the current output and include the constructor name it would be much better:

Day "2016-12-31" and DiffTime "1234s"

@erikd
Copy link
Collaborator

erikd commented Jul 25, 2016

@jystic Came here to raise this issue myself. I'd really like to see Thyme fixed so that it has a QuickCheck property like:

prop_read_show :: Day -> Property
prop_read_show day = read (show day) === day

With that I can write QC properties like that for my own data types which embed a Day type.

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

No branches or pull requests

2 participants