[GHC] #14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2)
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: | prime:Libraries/Proposals/SemigroupMonoid -------------------------------------+------------------------------------- More details in prime:Libraries/Proposals/SemigroupMonoid -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Changes (by hvr): * owner: (none) => hvr * differential: => phab:D3927 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Description changed by hvr: Old description:
More details in prime:Libraries/Proposals/SemigroupMonoid
New description: More details in prime:Libraries/Proposals/SemigroupMonoid For more recent details about phase 2, see https://groups.google.com/forum/#!topic/haskell-core-libraries/PyxpE2ebS9Q -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Changes (by hvr): * related: => #10365 Old description:
More details in prime:Libraries/Proposals/SemigroupMonoid
For more recent details about phase 2, see https://groups.google.com/forum/#!topic/haskell-core- libraries/PyxpE2ebS9Q
New description: More details in prime:Libraries/Proposals/SemigroupMonoid For more recent details about phase 2, see https://groups.google.com/forum/#!topic/haskell-core-libraries/PyxpE2ebS9Q For the previous phase1, see #10365 -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"8ae263ceb3566a7c82336400b09cb8f381217405/ghc" 8ae263c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="8ae263ceb3566a7c82336400b09cb8f381217405" Make Semigroup a superclass of Monoid (re #14191) Unfortunately, this requires introducing a couple of .hs-boot files to break up import cycles (mostly to provide class & typenames in order to be able to write type signatures). This does not yet re-export `(<>)` from Prelude (while the class-name `Semigroup` is reexported); that will happen in a future commit. Test Plan: local ./validate passed Reviewers: ekmett, austin, bgamari, erikd, RyanGlScott Reviewed By: ekmett, RyanGlScott GHC Trac Issues: #14191 Differential Revision: https://phabricator.haskell.org/D3927 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by siddhanathan): Is deprecating `Data.Semigroup.Option` within the scope of this proposal? It should now be obsolete since Semigroup is a superclass of Monoid. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Iceland_jack): The `Monoid` instances still differ {{{#!hs Semigroup a => Monoid (Option a) Monoid a => Monoid (Maybe a) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by RyanGlScott): The subtext of that question is that there are eventual plans to change the `Monoid` instance for `Maybe` to be `instance Semigroup a => Monoid (Maybe a)` (i.e., to remove [http://git.haskell.org/ghc.git/blob/838a10fcad9168895b49b4709056b549f2888860... this piece] of documentation). When that happens, there really will be no substantial difference between `Option` and `Maybe`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Iceland_jack): I would love to see that happen if it doesn't cause BC problems (then maybe.. `Apply f => Applicative (Lift f)`) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by RyanGlScott): The SMP is already a rather backwards //in//compatible change as it is (in the sense that many libraries are going to be broken until they catch up and add `Semigroup` instances), so I don't feel too shaken up about changing a `Monoid` constraint to a `Semigroup` one on top of that. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Iceland_jack): Sounds good -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"10ca8018900364579123bf3912202176d338d3c6/ghc" 10ca801/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="10ca8018900364579123bf3912202176d338d3c6" Generalise constraint on `instance Monoid (Maybe a)` to Semigroup This now becomes possible due to the introduction of the Semigroup=>Monoid superclass relation (see #14191). Reviewers: ekmett, RyanGlScott, austin, bgamari Reviewed By: ekmett, RyanGlScott, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3972 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 8.4.1 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: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"feac0a3bc69fd376231aa3c83d031c131156ddb9/ghc" feac0a3b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="feac0a3bc69fd376231aa3c83d031c131156ddb9" Reexport Semigroup's <> operator from Prelude (#14191) This completes the 2nd phase of the Semigroup=>Monoid Proposal (SMP) initiated in 8ae263ceb3566a7c82336400b09cb8f381217405. This updates a couple submodules to address <> naming clashes. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14191: Implement Semigroup as a superclass of Monoid Proposal (Phase 2) -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 8.4.1 Component: libraries/base | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10365 | Differential Rev(s): phab:D3927 Wiki Page: | prime:Libraries/Proposals/SemigroupMonoid| -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Comment: I believe this is now done. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14191#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC