[core libraries] Data.Display - Textual representation of Haskell values (was Re: PROPOSAL: Add displayException to Exception typeclass)

Simon Hengel sol at typeful.net
Tue Nov 11 07:53:37 UTC 2014


Hey Michael,

> One other question/comment: I'm not convinced that the `String`
> instance is a good thing. It will conflict with any other list
> instance

*nitpicking* I think it does not conflict "with any other list instance"
per se, e.g. you could still have:

    instance Display [Int]

But yes, it conflicts with the "more general"

    instance Display [a]

> unless you turn on OverlappingInstances (which I hope you don't).

Strong agreement, I'm not eager to use OverlappingInstances.

> You could use the `showList` hack, but we should really clarify first
> what the intended list instance is.

Yes and yes (We could consider showList and we should have a clear
picture what the desirable behavior is first).

Cheers,
Simon


More information about the Libraries mailing list