[Haskell-cafe] Monad-control rant

Mikhail Vorozhtsov mikhail.vorozhtsov at gmail.com
Wed Jan 18 09:47:44 CET 2012

On 01/18/2012 01:52 AM, Brandon Allbery wrote:
> On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov
> <mikhail.vorozhtsov at gmail.com <mailto:mikhail.vorozhtsov at gmail.com>> wrote:
>     I wouldn't be too optimistic about convincing GHC HQ. Even making
>     Applicative a superclass of Monad can make Haskell98 nazis come
>     after you in ninja suits.
> What?!  The only significant complaint I've seen here is that the
> necessary language support for doing so without breaking more or less
> every Haskell program currently in existence is difficult to achieve.
This is a /big/ exaggeration. What libraries exactly are going to be 
broken? Bytestring/Text (and all other data-structures-related libraries 
for that matter)? I don't think so. Network? Wouldn't be surprised if it 
goes without even a single patch. (Atto)Parsec/Binary/Cereal/*-Builder 
or Enumerator? A few type signatures (mainly contexts) and/or instances 
would need to be changed. Transformers? Some instances again. MTL? Looks 
surprisingly good.

I think with some coordinated effort we could switch the core libraries 
withing a week. On the client side of things I expect the change to go 
unnoticed by most people: by now virtually every custom monad has an 
Applicative instance. Personally, I wouldn't mind being hit by this 
hierarchy transformation, it is totally worth an hour of adjusting type 
contexts in my code (I'm currently maintaining ~17KLOC and I think I 
would need to touch only a handful of places).

More information about the Haskell-Cafe mailing list