[GHC] #10365: Implement Semigroup as a superclass of Monoid Proposal (Phase 1)
GHC
ghc-devs at haskell.org
Sun Nov 1 22:59:03 UTC 2015
#10365: Implement Semigroup as a superclass of Monoid Proposal (Phase 1)
-------------------------------------+-------------------------------------
Reporter: gidyn | Owner: quchen
Type: feature request | Status: patch
Priority: high | Milestone: 8.0.1
Component: libraries/base | Version: 7.10.1
Resolution: | Keywords: report-impact
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1284
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by nomeata):
I follow ekmett’s argument that Monoid to [] is like semigroups to ?, and
to me it makes sense of have a type for non-empty sets in base. (If having
a slim base were a goal, then maybe not, but I don’t see that being a goal
for the community in general).
But it is true that things are harder to fix once they are in base, so we
should aim to pick the “right” implementation. According to
https://wiki.haskell.org/Non-empty_list#Packages there are 6(!)
implementations of non-empty lists on hackage. I did not look at them
right now, so I’ll lazily pose the question: Is there any good reason to
prefer any of these over the implementation from `semigroups`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10365#comment:36>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list