[GHC] #10365: Implement Semigroup as a superclass of Monoid Proposal (Phase 1)

GHC ghc-devs at haskell.org
Sun Oct 18 17:18:16 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 Lemming):

 Replying to [comment:21 bergmark]:
 > I would like to see the partial functions removed as well. toList is
 total,  which makes fromList the most natural name for converting to a
 NonEmpty, but nope it's partial! Use nonEmpty instead. There's also a
 partial IsList instance, I really don't want literals to be able to crash
 at runtime.

 In the non-empty package I fall back to infix operators for non-empty list
 construction. E.g. constructing a list with at least two elements looks
 like this: {{{0 !: 1 !: 2 : 3 : 4 : []}}}.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10365#comment:27>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list