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

Peter Simons simons at cryp.to
Mon Oct 5 19:17:25 UTC 2015


Sven Panne <svenpanne at gmail.com> writes:

 > If you take e.g. (<$>) which is now part of the Prelude, you can't
 > simply import some compatibility module, because GHC might tell you
 > (rightfully) that that import is redundant, because (<$>) is already
 > visible through the Prelude.

Yes, the proper solution is slightly more complicated than just
importing Prelude.Compat [1]. You also have to specify "import
Prelude ()" -- or compile with NoImplicitPrelude, if you prefer
that kind of thing.

Best regards
Peter


[1] http://hackage.haskell.org/package/base-compat-0.8.2/docs/Prelude-Compat.html



More information about the Haskell-prime mailing list