Semigroups with absorption

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD-3-Clause licensed and maintained by Dimitri Sabadie

Monoid is a Semigroup glued with a neutral element called mempty. In the same idea, Zero is a Semigroup glued with an absorbing element called zero.

Keep in mind that Zero requires Semigroup. If you have Semigroup defined to work with Monoid, you might end up with no way to implement Zero. That’s why the Semigroup instance for Maybe is confusing, because it relies on Monoid, and cannot be used with Zero. Success is the Zero equivalent of Maybe + Monoid.



Thu May 16th 2019

  • Support for semigroups-0.19.


  • Support for GHC 8.0.1.

  • semigrous-0.18 support.


  • semigroups-0.17 support.


  • Replace hard-coded wrappers by Data.Monoid’s ones.
  • Fixed typo.


  • Added Any.
  • Added success and failure.


  • Initial revision.