| Copyright | (c) Donnacha Oisín Kidney 2021 |
|---|---|
| Maintainer | mail@doisinkidney.com |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Monus
Description
A class for Monoids with an order and a pseudo-subtraction operator.
Documentation
class (Ord a, Monoid a) => Monus a where Source #
A class for (constructive) totally-ordered commutative monoids. These
are monoids such that their ordering respects the <> operator, meaning
they obey the following law:
x<=x<>y
These monoids must also have a pseudo-subtraction operator (|-|), which
behaves like an absolute difference function. This operator must obey the
following law:
x<=y ==> x<>(y|-|x)==y