zero

Semigroups with absorption https://github.com/phaazon/zero

Version on this page:0.1.2
LTS Haskell 8.6:0.1.4
Stackage Nightly 2017-03-30:0.1.4
Latest on Hackage:0.1.4
BSD3 licensed and maintained by Dimitri Sabadie

Module documentation for 0.1.2

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.

Changes

0.1.4

  • Support for GHC 8.0.1.

0.1.3.1

  • semigrous-0.18 support.

0.1.3

  • semigroups-0.17 support.

0.1.2

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

0.1.1

  • Added Any.
  • Added success and failure.

0.1

  • Initial revision.
Depends on:
Used by 1 package:
comments powered byDisqus