Opened 3 years ago

Last modified 3 years ago

#154 new extension

Add Semigroup & Monoid classes

Reported by: David Luposchainsky Owned by:
Priority: normal Milestone: Haskell 201x
Version: Keywords:
Cc: Meta Owner: CLiC
State: discussion Section: Predefined Types/Classes
Related Tickets:

Description (last modified by Herbert Valerio Riedel)

Add Semigroup and Monoid classes

class Semigroup a where
    (<>) :: a -> a -> a -- Associative

class Semigroup a => Monoid a where
    mempty :: a -- left/right zero of (<>)

plus the respective instances for the standard types.

See also ghc:Proposal/SemigroupMonoid

Change History (4)

comment:1 Changed 3 years ago by David Luposchainsky

Description: modified (diff)
Type: modificationextension

comment:2 Changed 3 years ago by Herbert Valerio Riedel

Meta Owner: CLaC

comment:3 Changed 3 years ago by Herbert Valerio Riedel

Meta Owner: CLaCCLiC

comment:4 Changed 3 years ago by Herbert Valerio Riedel

Description: modified (diff)
Summary: Semigroup => MonoidAdd Semigroup & Monoid classes
Note: See TracTickets for help on using tickets.