
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

On Tue, 17 Feb 2009, Wolfgang Jeltsch wrote:
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.
Do you mean this one http://haskell.org/haskellwiki/Numeric_Prelude ? It's still missing proper support of groups, semigroups, monoids since it is not clear at all, how to structure that. However, then you might say that this package is overkill for Grapefruit since you only need the Semigroup class.

Am Donnerstag, 19. Februar 2009 00:17 schrieben Sie:
On Tue, 17 Feb 2009, Wolfgang Jeltsch wrote:
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.
Do you mean this one: http://haskell.org/haskellwiki/Numeric_Prelude?
There is currently no code for this, is there? In addition, I wouldn’t include algebraic structures in a *numerical* prelude since the cool thing about them is that they are so abstract that they are not only about numbers.
However, then you might say that this package is overkill for Grapefruit since you only need the Semigroup class.
What is the alternative to using a “numerical prelude” or the algebra package? Declaring the semigroup class inside Grapefruit? Then almost no library writer would define instances of this class. What’s the problem with Grapefruit having an additional dependency? If the package that is depended upon is open-source and automatically installable via cabal-install then the problems are little. On the other hand, you have the big advantage of modularization and thereby reuse of effort and consistency between different libraries (all use the same semigroup class). Best wishes, Wolfgang

On Thu, 19 Feb 2009, Wolfgang Jeltsch wrote:
Am Donnerstag, 19. Februar 2009 00:17 schrieben Sie:
Do you mean this one: http://haskell.org/haskellwiki/Numeric_Prelude?
There is currently no code for this, is there?
??? http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numeric-prelude http://darcs.haskell.org/numericprelude/

Wolfgang Jeltsch schrieb:
Am Donnerstag, 19. Februar 2009 00:17 schrieben Sie:
Do you mean this one: http://haskell.org/haskellwiki/Numeric_Prelude?
There is currently no code for this, is there?
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numeric-prelude http://darcs.haskell.org/numericprelude/

Am Freitag, 20. Februar 2009 00:38 schrieben Sie:
Wolfgang Jeltsch schrieb:
Am Donnerstag, 19. Februar 2009 00:17 schrieben Sie:
Do you mean this one: http://haskell.org/haskellwiki/Numeric_Prelude?
There is currently no code for this, is there?
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numeric-prelude http://darcs.haskell.org/numericprelude/
Is this linked from the wiki page? Best wishes, Wolfgang

On Fri, 20 Feb 2009, Wolfgang Jeltsch wrote:
Am Freitag, 20. Februar 2009 00:38 schrieben Sie:
Wolfgang Jeltsch schrieb:
Am Donnerstag, 19. Februar 2009 00:17 schrieben Sie:
Do you mean this one: http://haskell.org/haskellwiki/Numeric_Prelude?
There is currently no code for this, is there?
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numeric-prelude http://darcs.haskell.org/numericprelude/
Is this linked from the wiki page?
Of course. I wonder whether you have problems accessing the page ...

On 2009-02-19, Wolfgang Jeltsch
In addition, I wouldn’t include algebraic structures in a *numerical* prelude since the cool thing about them is that they are so abstract that they are not only about numbers.
But the thing is that to have the numerical classes support the proper abstractions we want them to support, we need to define the algebraic structures as well. So the rework goes together... -- Aaron Denney -><-

Am Dienstag, 24. Februar 2009 09:30 schrieb Aaron Denney:
On 2009-02-19, Wolfgang Jeltsch
wrote: In addition, I wouldn’t include algebraic structures in a *numerical* prelude since the cool thing about them is that they are so abstract that they are not only about numbers.
But the thing is that to have the numerical classes support the proper abstractions we want them to support, we need to define the algebraic structures as well. So the rework goes together...
Of course! It’s just that having algebraic structures in a separate algebra package is in my opinion a better idea than having them in a numeric prelude. Best wishes, Wolfgang
participants (3)
-
Aaron Denney
-
Henning Thielemann
-
Wolfgang Jeltsch