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

Missing Pretty instance for Doc itself #41

Open
Javran opened this issue Mar 2, 2017 · 2 comments
Open

Missing Pretty instance for Doc itself #41

Javran opened this issue Mar 2, 2017 · 2 comments

Comments

@Javran
Copy link

Javran commented Mar 2, 2017

should be a straightforward pPrint = id. I'm wondering if there is a particular reason behind not implementing this instance?

@jwaldmann
Copy link

Depends on what behaviour you expect.

Going by the definition https://hackage.haskell.org/package/pretty-1.1.3.5/docs/Text-PrettyPrint-HughesPJClass.html "simlar to Show but nicer looking" I'd expect the contract for Show,

in particular, sth. like "read . show == id". Note that pPrint "foo" gives "foo", not foo.

And I'd not expect Doc things to be readable. Things produced by pPrint, yes - but general Doc, no.

@jwaldmann
Copy link

see also #37 for other possible instances of Pretty

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