Draft Libraries Document

Dylan Thurston dpt@math.harvard.edu
Thu, 31 May 2001 18:50:39 -0400

On Thu, May 31, 2001 at 04:27:14PM -0600, Alastair David Reid wrote:
> While pondering what else we'd put in mathematics other than numeric
> stuff, I hit upon the crazy idea of adding:
>    Mathematics.Monad
> instead of putting Monad in Control (which is the current proposal, I
> believe).

I'd vote against this.  Monads are not terribly prominent in
mathematics.  They're used in category theory, but the reason they're
in Haskell is because of their usefulness as a control structure.

> o There's a bit of a conflict between being easy to use and being
>   mathematically pure (e.g., Num is almost a ring but not quite
>   (fromInteger springs to mind)).  If we put things in Mathematics,
>   the mathematicians have a strong argument for doing things the
>   "Right Way" but if we leave it in Control, then the pragmatists
>   retains some, ummm, control.

As a side note, "fromInteger" is just fine and belongs with rings.
(See earlier posts).  I'm much more annoyed by "abs" and "signum", not
to mention the name "Num" and the inheritance from "Show" (and "Eq").

But that's all irrelevant to the current discussion, except that I
support anything that leads to doing things the "Right Way". :-)

> ps Irrespective of this, I think Mathematics is a good idea because
> sooner or later, someone is going to add matrix ops, rings, monoids,
> categories, etc. to the library and they will want a place to hold
> them.

Hmm.  Reading this list, categories don't seem to fit that well.  On
reflection, "Mathematics" is extremely broad; perhaps too broad.
Maybe "Algebra" is better?

--Dylan Thurston