[GHC] #14200: Deprecate WrappedMonad

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: | Version: 8.2.1 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I believe that `Control.Applicative.WrappedMonad` is obsolete now that AMP is implemented. I would propose deprecating `WrappedMonad` as a result. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13876 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: hvr, ekmett, core-libraries-committee@… (added) * related: => #13876 Comment: I'm inclined to agree here. At one point in time, where `return` was a canonical class method of `Monad`, it was commonplace to define `Applicative` and `Functor` methods entirely in terms of `Monad` methods. But now `return = pure`, and there are [https://ghc.haskell.org/trac/ghc/wiki/Proposal/MonadOfNoReturn plans] to eventually remove `return` as a class method of `Monad` entirely. When this happens, `WrappedMonad` won't be nearly as useful as it once was, since one won't be able to define `Applicative(pure)` from an arbitrary `Monad` instance anymore (see also #13876). This makes the utility of a `WrappedMonad` newtype dubious. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13876 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): I am inclined to agree -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13876 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by andrewthad): I accidentally opened a duplicate of this ticket with #15027. I'm +1 on deprecating and removing this type. Related resources: Mailing list discussion: https://mail.haskell.org/pipermail/libraries/2018-April/028746.html GitHub PR: https://github.com/ghc/ghc/pull/129 It appears that this type still enjoys a small amount of use for backwards-compatibility purposes. This makes me wonder if `base-compat` might be a better home for it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13876 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hvr): I do like the idea of moving `WrappedMonad` to `base-compat` (also note that I semi-broke the definition of `WrappedMonad` 3 years ago... so it'd be good if `base-compat` could retroactively provide a less-broken version :-) ) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14200: Deprecate WrappedMonad -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13876 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): It's worth noting that `base-compat` doesn't backport data type definitions, so that's not a good home for it. I have no objections to ripping `WrappedMonad` out of `base` if that's what folks prefer. On the other hand, we do have a non-broken `WrappedMonoid` still in `Data.Semigroup`, so it feels somewhat strange to keep that but remove `WrappedMonoid`. But perhaps it's best to leave this discussion on the libraries mailing list... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14200#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC