Safe Haskell | None |
---|
These algebraic structures have sacrificed generality in favor of being easily used with the standard Haskell Prelude. The fact that monoids are not guaranteed to be semigroups makes this difficult.
- class Semigroup g => RegularSemigroup g where
- inverse :: g -> g
- class (RegularSemigroup g, Monoid g) => Group g
- class Semigroup sg => Abelian sg
- module Data.Semigroup
Type classes
class Semigroup g => RegularSemigroup g whereSource
Semigroups that also have an inverse. See https://en.wikipedia.org/wiki/Regular_semigroup
(Semigroup (RegSG2Group sg), RegularSemigroup sg) => RegularSemigroup (RegSG2Group sg) | |
(Semigroup (FreeMod r a), Num r, Ord a) => RegularSemigroup (FreeMod r a) |
class (RegularSemigroup g, Monoid g) => Group g Source
Regular semigroups that also have an identity; alternatively, monoids where every element has a unique inverse. See https://en.wikipedia.org/wiki/Group_(mathematics)
(RegularSemigroup g, Monoid g) => Group g | |
(RegularSemigroup (RegSG2Group sg), Monoid (RegSG2Group sg), RegularSemigroup sg) => Group (RegSG2Group sg) |
module Data.Semigroup