numeric-prelude-0.4.2: 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-Inferred
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 
C Any 
C T 
C a => C (Dual a) 
C (Endo a) 
C a => C (Sum a) 
C a => C (Product a) 
C (First a) 
C (Last a) 
C a => C (T a) 
Ord a => C (Max a) 
Ord a => C (Min a) 
C a => C (LCM a) 
C a => C (GCD a) 
Ix i => C (T i) 
C a => C (T a)