Proposal: merge either into transformers

Ross Paterson R.Paterson at city.ac.uk
Wed Apr 30 08:29:18 UTC 2014


On Wed, Apr 30, 2014 at 01:11:19AM -0400, Edward Kmett wrote:
> As a straw man, if we really don't export the constructor and
> implement the writerT API abstractly you can actually can implement
> Show/Read/Ord/Eq correctly.
>
> Under the assumption that it only uses the state as a writer context:
> we could safely pass it the mempty state for display purposes to
> capture the information present.

That's neat (the power of abstraction), but people might be surprised
by the performance of things like

	let m = enormous computation
	in m == m

There's a similar issue with the Applicative instance, and indeed any
situation where the lazy instance would give a shared value while the
state-based one wouldn't.  There's a strong argument for transparent
types in transformers, which many people already find complex.


More information about the Libraries mailing list