Data.Monoid.Cancellative

monoid-subclasses-1.2.5.1: Subclasses of Monoid

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Monoid.Cancellative

Contents

- Symmetric, commutative monoid classes
- Asymmetric monoid classes

Description

This module defines the `Monoid` => `CommutativeMonoid` => `ReductiveMonoid` => `CancellativeMonoid` constraint synonym hierarchy.

Since most practical monoids in Haskell are not commutative, the last two of these synonyms have two symmetric superclasses each:

- `LeftReductiveMonoid`
- `LeftCancellativeMonoid`
- `RightReductiveMonoid`
- `RightCancellativeMonoid`

This module and its constraint synonyms are provided for compatibility with the older versions of the `monoid-sublasses` library. Starting with version 1.0, the classes from the Data.Semigroup.Cancellative module are recommended instead.

Synopsis

- module Data.Semigroup.Cancellative
- module Data.Monoid.GCD
- type CommutativeMonoid m = (Monoid m, Commutative m)
- type ReductiveMonoid m = (Monoid m, Reductive m)
- type CancellativeMonoid m = (Monoid m, Cancellative m)
- type LeftReductiveMonoid m = (Monoid m, LeftReductive m)
- type RightReductiveMonoid m = (Monoid m, RightReductive m)
- type LeftCancellativeMonoid m = (Monoid m, LeftCancellative m)
- type RightCancellativeMonoid m = (Monoid m, RightCancellative m)

# Documentation

module Data.Semigroup.Cancellative

module Data.Monoid.GCD

# Symmetric, commutative monoid classes

type CommutativeMonoid m = (Monoid m, Commutative m) #

type ReductiveMonoid m = (Monoid m, Reductive m) #

type CancellativeMonoid m = (Monoid m, Cancellative m) #

# Asymmetric monoid classes

type LeftReductiveMonoid m = (Monoid m, LeftReductive m) #

type RightReductiveMonoid m = (Monoid m, RightReductive m) #

type LeftCancellativeMonoid m = (Monoid m, LeftCancellative m) #

type RightCancellativeMonoid m = (Monoid m, RightCancellative m) #