Copyright | (C) 2015 Dimitri Sabadie |
---|---|
License | BSD3 |
Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Semigroups with absorbing element
class Semigroup a => Zero a where Source
Semigroup
with a zero
element. It’s important to understand that the
standard Semigroup
types – i.e. Maybe
and so on – are already biased,
because they’re Monoid
s. That’s why you’ll find a few Zero
instances.
Should satisfies the following laws:
Annihilation
a<>
zero
=zero
<>
a =zero
Associativity
a<>
b<>
c = (a<>
b)<>
c = a<>
(b<>
c)
The zero element.
Num wrappers
newtype Product a :: * -> *
Monoid under multiplication.
Product | |
|
Generic1 Product | |
Bounded a => Bounded (Product a) | |
Eq a => Eq (Product a) | |
Num a => Num (Product a) | |
Ord a => Ord (Product a) | |
Read a => Read (Product a) | |
Show a => Show (Product a) | |
Generic (Product a) | |
Num a => Monoid (Product a) | |
Num a => Semigroup (Product a) | |
Num a => Zero (Product a) | |
type Rep1 Product = D1 D1Product (C1 C1_0Product (S1 S1_0_0Product Par1)) | |
type Rep (Product a) = D1 D1Product (C1 C1_0Product (S1 S1_0_0Product (Rec0 a))) |
Boolean wrappers
Maybe wrappers
Success | |
|
Monad Success Source | |
Functor Success Source | |
MonadFix Success Source | |
Applicative Success Source | |
Foldable Success Source | |
Traversable Success Source | |
Eq a => Eq (Success a) Source | |
Ord a => Ord (Success a) Source | |
Read a => Read (Success a) Source | |
Show a => Show (Success a) Source | |
Semigroup a => Semigroup (Success a) Source | |
Semigroup a => Zero (Success a) Source |