
#13876: Check 'pure' method of 'Applicative (WrappedMonad m)' -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I think I agree with bgamari here. Although we haven't removed `return` from `Monad` entirely, we've already taken the important step of refactoring just about all of `base` to define things first and foremost in terms of `pure`, and defining `return = pure` elsewhere. At this point, making another change to the semantics of `WrapMonad`'s `return` instance just for this use case feels pointless in the long run since, as others have noted, `return` really should work the same as `pure` from here on out in anticipation of `return`'s eventual removal from the `Monad` class. As for a solution to your problem, I'd suggest your idea of having another wrapper `newtype` that uses `Pointed` and `Monad` to retrofit `Applicative` instances. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13876#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler