[Haskell-cafe] Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`

Herbert Valerio Riedel hvr at gnu.org
Tue Oct 6 08:31:30 UTC 2015

On 2015-10-06 at 05:43:43 +0200, Rustom Mody wrote:


> The python 2→3 transition may have caused some pain to some. However it
> would have been far more difficult if they had not provided tools like
> 2to3 and six:
> https://docs.python.org/2/library/2to3.html
> http://pythonhosted.org/six/
> Since the change here is trivial and pervasive why is such a tool not being
> considered?
> [Or have I missed the discussion?]

It is being considered! :-)

I'm in the process of collecting rewrite recipes and samples on


Alan is looking into how HaRe can be leveraged for this. I've refrained
from bringing this up, as I'm still waiting to reach a proof-of-concept
stage where we can confidently say that this actually works.

> In particular we can envisage a tool say 8to10 that has these modes
> (command-line flags)
> --portable
> --readable
> --info
> with the idea that
> - portable is most unreadable (ifdef litter)
> - readable is not portable -- generate a copy of the whole source tree that
> will have the changes and not be compatible for ghc < 7.8
>   This is for those library authors that prefer to maintain a clean code
> base and hell with earlier ghc versions
> - info summarizes which files would change and how so that a suitable
> reorganization of the files/directories can be done prior to the switch
>   This is for those library authors that would like to take the trouble to
> have a compatibility layer and have code as readable as possible overall
> [Whether pure is really preferable to return is another matter --
> For me one of the strongest criticisms of the python 2→3 switch is this
> that if they were going to break things anyhow why was the cleanup not more
> far-reaching?
> Lets keep this note in these parentheses :-)
> ]
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

"Elegance is not optional" -- Richard O'Keefe

More information about the Haskell-Cafe mailing list