numeric-prelude-0.4.3: An experimental alternative hierarchy of numeric type classes

Copyright(c) Henning Thielemann 2009-2010 Mikael Johansson 2006
Maintainernumericprelude@henning-thielemann.de
Stabilityprovisional
PortabilityAbstract concept of a Monoid.
Safe HaskellSafe
LanguageHaskell98

Algebra.Monoid

Description

Will be used in order to generate type classes for generic algebras. An algebra is a vector space that also is a monoid. Should we use the Monoid class from base library despite its unfortunate method name mappend?

Synopsis

Documentation

class C a where Source #

We expect a monoid to adher to associativity and the identity behaving decently. Nothing more, really.

Minimal complete definition

idt, (<*>)

Methods

idt :: a Source #

(<*>) :: a -> a -> a Source #

cumulate :: [a] -> a Source #

Instances

C All Source # 

Methods

idt :: All Source #

(<*>) :: All -> All -> All Source #

cumulate :: [All] -> All Source #

C Any Source # 

Methods

idt :: Any Source #

(<*>) :: Any -> Any -> Any Source #

cumulate :: [Any] -> Any Source #

C T Source # 

Methods

idt :: T Source #

(<*>) :: T -> T -> T Source #

cumulate :: [T] -> T Source #

C a => C (Dual a) Source # 

Methods

idt :: Dual a Source #

(<*>) :: Dual a -> Dual a -> Dual a Source #

cumulate :: [Dual a] -> Dual a Source #

C (Endo a) Source # 

Methods

idt :: Endo a Source #

(<*>) :: Endo a -> Endo a -> Endo a Source #

cumulate :: [Endo a] -> Endo a Source #

C a => C (Sum a) Source # 

Methods

idt :: Sum a Source #

(<*>) :: Sum a -> Sum a -> Sum a Source #

cumulate :: [Sum a] -> Sum a Source #

C a => C (Product a) Source # 
C (First a) Source # 

Methods

idt :: First a Source #

(<*>) :: First a -> First a -> First a Source #

cumulate :: [First a] -> First a Source #

C (Last a) Source # 

Methods

idt :: Last a Source #

(<*>) :: Last a -> Last a -> Last a Source #

cumulate :: [Last a] -> Last a Source #

Ord a => C (Max a) Source # 

Methods

idt :: Max a Source #

(<*>) :: Max a -> Max a -> Max a Source #

cumulate :: [Max a] -> Max a Source #

Ord a => C (Min a) Source # 

Methods

idt :: Min a Source #

(<*>) :: Min a -> Min a -> Min a Source #

cumulate :: [Min a] -> Min a Source #

C a => C (LCM a) Source # 

Methods

idt :: LCM a Source #

(<*>) :: LCM a -> LCM a -> LCM a Source #

cumulate :: [LCM a] -> LCM a Source #

C a => C (GCD a) Source # 

Methods

idt :: GCD a Source #

(<*>) :: GCD a -> GCD a -> GCD a Source #

cumulate :: [GCD a] -> GCD a Source #

C a => C (T a) Source # 

Methods

idt :: T a Source #

(<*>) :: T a -> T a -> T a Source #

cumulate :: [T a] -> T a Source #

Ix i => C (T i) Source # 

Methods

idt :: T i Source #

(<*>) :: T i -> T i -> T i Source #

cumulate :: [T i] -> T i Source #