A sample revised prelude for numeric classes

John Meacham john@foo.net
Mon, 12 Feb 2001 02:21:08 -0800

I quadruple the vote that the basic algebra proposal is too complicated.
However I don't see how one could write even moderately complex programs
and not wish for a partial ordering class or the ability to use standard
terms for groups and whatnot. the current proposal is much more to my

An important thing is that in Haskell it is easy to build up
functionality with fine grained control, but difficult or impossible to
tear it down, You can't take a complicated class and split it up into
smaller independent pieces(not easily at least). but you can
take the functionality of several smaller classes and build up a
'bigger' class. Because of this feature one should always err on the
side of simplicity and smaller classes when writing re-usable code. 

I guess what I'm trying to say is that we don't need a Prelude which
will provide all of the mathematical structure everyone will need or
want, but rather one which doesn't inhibit the ability to build what is
needed upon it in a reasonable fashion. (I don't consider un-importing
the prelude reasonable for re-usable code and libraries meant to be

in short, three cheers for the new proposal. My one request is that if
at all possible, make some sort of partial ordering class part of the
changes, they are just way to useful in all types of programs to not
have a standard abstraction.


John Meacham   http://www.ugcs.caltech.edu/~john/
California Institute of Technology, Alum.  john@foo.net