[Haskell-cafe] package for algebraic structures
g9ks157k at acme.softbase.org
Thu Feb 19 03:48:43 EST 2009
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).
More information about the Haskell-Cafe