Copyright | (C) 2015 Dimitri Sabadie |
---|---|
License | BSD3 |
Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.Zero
Description
Documentation
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:
Annhilation
a<>
zero
=zero
<>
a =zero
Associativity
a<>
b<>
c = (a<>
b)<>
c = a<>
(b<>
c)
Minimal complete definition
Methods
The zero element.
Zero
under multiplication.
Constructors
Product | |
Fields
|
Instances
Bounded a => Bounded (Product a) Source | |
Eq a => Eq (Product a) Source | |
Num a => Num (Product a) Source | |
Ord a => Ord (Product a) Source | |
Read a => Read (Product a) Source | |
Show a => Show (Product a) Source | |
Generic (Product a) Source | |
Num a => Semigroup (Product a) Source | |
Num a => Zero (Product a) Source | |
type Rep (Product a) Source |
Zero
under boolean logical or.
Zero
under boolean logical and.
Constructors
Success | |
Fields
|
Instances
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 |