| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Data.Monoid.Null
Description
This module defines the MonoidNull class and some of its instances.
- class Monoid m => MonoidNull m where
- class MonoidNull m => PositiveMonoid m
Documentation
class Monoid m => MonoidNull m where #
Extension of Monoid that allows testing a value for equality with mempty. The following law must hold:
null x == (x == mempty)
Furthermore, the performance of this method should be constant, i.e., independent of the length of its argument.
Minimal complete definition
Instances
class MonoidNull m => PositiveMonoid m #
Subclass of Monoid for types whose values have no inverse, with the exception of mempty. More
formally, the class instances must satisfy the following law:
null (x <> y) == (null x && null y)
Instances
| PositiveMonoid Ordering # | |
| PositiveMonoid () # | |
| PositiveMonoid All # | |
| PositiveMonoid Any # | |
| PositiveMonoid ByteString # | |
| PositiveMonoid ByteString # | |
| PositiveMonoid IntSet # | |
| PositiveMonoid Text # | |
| PositiveMonoid Text # | |
| PositiveMonoid ByteStringUTF8 # | |
| PositiveMonoid [x] # | |
| Monoid a => PositiveMonoid (Maybe a) # | |
| PositiveMonoid a => PositiveMonoid (Dual a) # | |
| PositiveMonoid (First a) # | |
| PositiveMonoid (Last a) # | |
| PositiveMonoid (Seq a) # | |
| PositiveMonoid (IntMap v) # | |
| Ord a => PositiveMonoid (Set a) # | |
| PositiveMonoid (Vector a) # | |
| PositiveMonoid a => PositiveMonoid (Concat a) # | |
| StableFactorialMonoid a => PositiveMonoid (Measured a) # | |
| (StableFactorialMonoid m, TextualMonoid m) => PositiveMonoid (LinePositioned m) # | |
| StableFactorialMonoid m => PositiveMonoid (OffsetPositioned m) # | |
| Ord k => PositiveMonoid (Map k v) # | |
| (PositiveMonoid a, PositiveMonoid b) => PositiveMonoid (Stateful a b) # | |