Proposal: Add IsList instance for ZipList

Henning Thielemann lemming at henning-thielemann.de
Fri Jun 12 01:49:37 UTC 2015


On Thu, 11 Jun 2015, Edward Kmett wrote:

> I personally strongly believe in keeping the Applicative and Monad for a 
> type compatible. Otherwise why the heck did we make Applicative a 
> superclass of Monad?

I was extending the thought of treating a list like it would have ZipList 
semantics. I thought loudly about what I would have done if I could 
re-invent Haskell 98. If list would have an Applicative instance with 
ZipList semantics then it would not have a Monad instance, at all.


> In this case the thing David wants only makes any difference if you 
> explicitly turn on OverloadedLists, so if you never use that extension 
> you'll never care about the instance anyways.

When I speak about surprises then I mean the situation where I read code 
of others, since I am not as much surprised about my own code. In this 
case someone else has enabled OverloadedLists.


More information about the Libraries mailing list