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 Monoid g => Group g where
- inverse :: g -> g
- class Monoid m => Abelian m
- data FreeInverse a
- = FreeInverse !a
- | Negate !a
- class Invertible a where
- module Data.Monoid
Algebra
class Monoid g => Group g whereSource
Groups are monoids that also have an inverse. See https://en.wikipedia.org/wiki/Regular_semigroup
(Group x, Group (HList xs)) => Group (HList (: * x xs)) | |
Group (HList ([] *)) | |
Num r => Group (L2 [r]) | |
(Num r, Ord a) => Group (FreeModule r a) | |
(Group (HList xs), ValidHVector box xs) => Group (HVector * box xs) | |
(Group model, SingI Nat n) => Group (Bagging' n seed model) | |
Group (container model) => Group (FreeHomTrainer' k container model) |
class Monoid m => Abelian m Source
(Abelian x, Abelian (HList xs)) => Abelian (HList (: * x xs)) | |
Abelian (HList ([] *)) | |
Num r => Abelian (L2 [r]) | |
(Num r, Ord a) => Abelian (FreeModule r a) | |
(Abelian (HList xs), ValidHVector box xs) => Abelian (HVector * box xs) | |
(Abelian model, SingI Nat n) => Abelian (Bagging' n seed model) | |
Abelian (container model) => Abelian (FreeHomTrainer' k container model) |
Non-algebraic
data FreeInverse a Source
FreeInverse !a | |
Negate !a |
Eq a => Eq (FreeInverse a) | |
Ord a => Ord (FreeInverse a) | |
Read a => Read (FreeInverse a) | |
Show a => Show (FreeInverse a) | |
Eq a => Invertible (FreeInverse a) |
class Invertible a whereSource
Eq a => Invertible (FreeInverse a) |
module Data.Monoid