[Haskell-cafe] NB: DO NOT USE `pure = return`

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Mon Jul 1 19:09:13 UTC 2019


Dear Cafe,

the migration guide (for AMP)

https://gitlab.haskell.org/ghc/ghc/wikis/migration/7.10#ghc-says-no-instance-for-applicative-

contains this advice:

instance Applicative Foo where
    -- NB: DO NOT USE `pure = return`

Why not? Because it would require another refactoring
once "monad of no return" comes true?

So defining `return` in the Monad instance should work fine until then?
Which is when exactly? I can't quite make it out from
https://gitlab.haskell.org/ghc/ghc/wikis/proposal/monad-of-no-return/discussion


- J.W.



More information about the Haskell-Cafe mailing list