[Haskell-cafe] package for algebraic structures

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Tue Feb 17 11:02:50 EST 2009


Hello,

for Grapefruit’s incremental list signal support, I needed a type class of 
semigroups. A semigroup is similar to a monoid. The difference is that a 
semigroup doesn’t need to have a neutral element. So a semigroup type class 
would make a perfect superclass of Monoid, by the way.

Since a semigroup class could be of more general interest, I decided to not 
include it in Grapefruit. Since I couldn’t quickly find an implementation of 
semigroups in Haskell, I put my own into a new package.

Now, a package only for one class with one method seems like overkill. 
However, it could serve as a start for a package of all kinds of algebraic 
structures. So I called the package “algebra” and put it on Hackage.

So if someone wants to implement rings, ideals, fields or whatever, I’d be 
happy to receive patches.

Best wishes,
Wolfgang


More information about the Haskell-Cafe mailing list