monoid-subclasses-0.4.6.1: Subclasses of Monoid

Safe HaskellTrustworthy
LanguageHaskell2010

Data.Monoid.Null

Description

This module defines the MonoidNull class and some of its instances.

Synopsis

Documentation

class Monoid m => MonoidNull m where Source #

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

null

Methods

null :: m -> Bool Source #

Instances
MonoidNull Ordering Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Ordering -> Bool Source #

MonoidNull () Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: () -> Bool Source #

MonoidNull All Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: All -> Bool Source #

MonoidNull Any Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Any -> Bool Source #

MonoidNull ByteString Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: ByteString -> Bool Source #

MonoidNull ByteString Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: ByteString -> Bool Source #

MonoidNull IntSet Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: IntSet -> Bool Source #

MonoidNull Text Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Text -> Bool Source #

MonoidNull Text Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Text -> Bool Source #

MonoidNull ByteStringUTF8 Source # 
Instance details

Defined in Data.Monoid.Instances.ByteString.UTF8

MonoidNull [x] Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: [x] -> Bool Source #

Monoid a => MonoidNull (Maybe a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Maybe a -> Bool Source #

MonoidNull (First a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: First a -> Bool Source #

MonoidNull (Last a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Last a -> Bool Source #

MonoidNull a => MonoidNull (Dual a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Dual a -> Bool Source #

(Num a, Eq a) => MonoidNull (Sum a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Sum a -> Bool Source #

(Num a, Eq a) => MonoidNull (Product a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Product a -> Bool Source #

MonoidNull (IntMap v) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: IntMap v -> Bool Source #

MonoidNull (Seq a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Seq a -> Bool Source #

Ord a => MonoidNull (Set a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Set a -> Bool Source #

MonoidNull (Vector a) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Vector a -> Bool Source #

(StableFactorialMonoid m, TextualMonoid m, MonoidNull m) => MonoidNull (LinePositioned m) Source # 
Instance details

Defined in Data.Monoid.Instances.Positioned

(StableFactorialMonoid m, MonoidNull m) => MonoidNull (OffsetPositioned m) Source # 
Instance details

Defined in Data.Monoid.Instances.Positioned

StableFactorialMonoid a => MonoidNull (Measured a) Source # 
Instance details

Defined in Data.Monoid.Instances.Measured

Methods

null :: Measured a -> Bool Source #

PositiveMonoid a => MonoidNull (Concat a) Source # 
Instance details

Defined in Data.Monoid.Instances.Concat

Methods

null :: Concat a -> Bool Source #

(MonoidNull a, MonoidNull b) => MonoidNull (a, b) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: (a, b) -> Bool Source #

Ord k => MonoidNull (Map k v) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: Map k v -> Bool Source #

(MonoidNull a, MonoidNull b) => MonoidNull (Stateful a b) Source # 
Instance details

Defined in Data.Monoid.Instances.Stateful

Methods

null :: Stateful a b -> Bool Source #

(MonoidNull a, MonoidNull b, MonoidNull c) => MonoidNull (a, b, c) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: (a, b, c) -> Bool Source #

(MonoidNull a, MonoidNull b, MonoidNull c, MonoidNull d) => MonoidNull (a, b, c, d) Source # 
Instance details

Defined in Data.Monoid.Null

Methods

null :: (a, b, c, d) -> Bool Source #

class MonoidNull m => PositiveMonoid m Source #

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 Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid () Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid All Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid Any Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid ByteString Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid ByteString Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid IntSet Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid Text Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid Text Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid ByteStringUTF8 Source # 
Instance details

Defined in Data.Monoid.Instances.ByteString.UTF8

PositiveMonoid [x] Source # 
Instance details

Defined in Data.Monoid.Null

Monoid a => PositiveMonoid (Maybe a) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid (First a) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid (Last a) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid a => PositiveMonoid (Dual a) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid (IntMap v) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid (Seq a) Source # 
Instance details

Defined in Data.Monoid.Null

Ord a => PositiveMonoid (Set a) Source # 
Instance details

Defined in Data.Monoid.Null

PositiveMonoid (Vector a) Source # 
Instance details

Defined in Data.Monoid.Null

(StableFactorialMonoid m, TextualMonoid m) => PositiveMonoid (LinePositioned m) Source # 
Instance details

Defined in Data.Monoid.Instances.Positioned

StableFactorialMonoid m => PositiveMonoid (OffsetPositioned m) Source # 
Instance details

Defined in Data.Monoid.Instances.Positioned

StableFactorialMonoid a => PositiveMonoid (Measured a) Source # 
Instance details

Defined in Data.Monoid.Instances.Measured

PositiveMonoid a => PositiveMonoid (Concat a) Source # 
Instance details

Defined in Data.Monoid.Instances.Concat

Ord k => PositiveMonoid (Map k v) Source # 
Instance details

Defined in Data.Monoid.Null

(PositiveMonoid a, PositiveMonoid b) => PositiveMonoid (Stateful a b) Source # 
Instance details

Defined in Data.Monoid.Instances.Stateful