monoids-0.1.36: Monoids, specialized containers and a general map/reduce frameworkSource codeContentsIndex
Data.Ring
Portabilityportable (instances use MPTCs)
Stabilityexperimental
Maintainerekmett@gmail.com
Description

Defines left- and right- seminearrings. Every MonadPlus wrapped around a Monoid qualifies due to the distributivity of (>>=) over mplus.

See http://conway.rutgers.edu/~ccshan/wiki/blog/posts/WordNumbers1/

Synopsis
module Data.Group
class (Multiplicative m, Monoid m) => Ringoid m
class Ringoid m => LeftSemiNearRing m
class Ringoid m => RightSemiNearRing m
class (RightSemiNearRing a, LeftSemiNearRing a) => SemiRing a
class (Group a, SemiRing a) => Ring a
class (Ring a, MultiplicativeGroup a) => DivisionRing a
class (Ring a, MultiplicativeGroup a) => Field a
Documentation
module Data.Group
class (Multiplicative m, Monoid m) => Ringoid m Source
0 annihilates times
show/hide Instances
Ringoid Int
Ringoid Integer
Ringoid Natural
Monoid m => Ringoid ([] m)
Monoid m => Ringoid (Maybe m)
Ringoid m => Ringoid (Dual m)
Ringoid m => Ringoid (Self m)
Ringoid m => Ringoid (FromString m)
Num a => Ringoid (FromNum a)
Bits a => Ringoid (Boolean a)
(Bounded a, Enum a) => Ringoid (BitSet a)
Ord a => Ringoid (Priority a)
(Bounded a, Ord a) => Ringoid (Order a)
(Ord a, Num a) => Ringoid (Tropical a)
(Measured v m, Monoid m) => Ringoid (FingerTree v m)
Ringoid m => Ringoid (ReducedBy m s)
(Alternative f, Monoid a) => Ringoid (Alt f a)
(MonadPlus m, Monoid a) => Ringoid (MonadSum m a)
(Modular s a, Integral a) => Ringoid (Mod a s)
(MonadPlus m, Monoid w, Monoid n) => Ringoid (WriterT w m n)
(MonadPlus m, Monoid w, Monoid n) => Ringoid (WriterT w m n)
(MonadPlus m, Monoid n) => Ringoid (StateT s m n)
(MonadPlus m, Monoid n) => Ringoid (StateT s m n)
(MonadPlus m, Monoid n) => Ringoid (ReaderT e m n)
(Ringoid r, Bimodule r m) => Ringoid (D s r m)
(Stream s m t, Monoid a) => Ringoid (ParsecT s u m a)
(MonadPlus m, Monoid w, Monoid n) => Ringoid (RWST r w s m n)
(MonadPlus m, Monoid w, Monoid n) => Ringoid (RWST r w s m n)
class Ringoid m => LeftSemiNearRing m Source
a * (b + c) = (a * b) + (a * c)
show/hide Instances
class Ringoid m => RightSemiNearRing m Source
(a + b) * c = (a * c) + (b * c)
show/hide Instances
class (RightSemiNearRing a, LeftSemiNearRing a) => SemiRing a Source
A SemiRing is an instance of both Multiplicative and Monoid where times distributes over plus.
show/hide Instances
class (Group a, SemiRing a) => Ring a Source
show/hide Instances
Ring r => Ring (Dual r)
Ring r => Ring (Self r)
Ring r => Ring (FromString r)
Num a => Ring (FromNum a)
Bits a => Ring (Boolean a)
Ring r => Ring (ReducedBy r s)
(Modular s a, Integral a) => Ring (Mod a s)
(Ring r, Bimodule r m, Group m) => Ring (D s r m)
class (Ring a, MultiplicativeGroup a) => DivisionRing a Source
show/hide Instances
class (Ring a, MultiplicativeGroup a) => Field a Source
show/hide Instances
Field f => Field (Dual f)
Field f => Field (Self f)
Field f => Field (FromString f)
Field f => Field (ReducedBy f s)
Produced by Haddock version 2.4.2