Anything that associates
open sourceBSD-3-Clausefree
semigroups is a Haskell package by Edward Kmett that provided the Semigroup class and non-empty lists before they moved into base. Since base 4.9.0.0 ships Data.Semigroup and Data.List.NonEmpty, the package now mainly offers tools for deriving Semigroup instances with generics, and keeps older code that depends on it building.
Problems it solves
- derive Semigroup instances for my Haskell types with generics
- keep a Haskell project that imports the semigroups package building on new GHC versions
- a Semigroup class for Haskell code that has to support very old GHC versions
Features
- generic deriving of Semigroup instances
- compatibility for code written before Semigroup moved into base
Limitations
- Data.Semigroup and Data.List.NonEmpty have been in base since 4.9.0.0, so this package now mainly adds tools for deriving semigroups with generics1
Alternatives
The same job
These do what semigroups does.
- contravariant Contravariant functors for Haskell
- semigroupoids id-free versions of Haskell's Category, Applicative, Monad and related type classes
- bifunctors Haskell bifunctors, bifoldables and bitraversables
- constraints Data types and classes for GHC's ConstraintKinds
- comonad Comonads for Haskell, the categorical dual of monads
