On 2008-04-30, Ross Paterson [EMAIL PROTECTED] wrote:
On Thu, Apr 24, 2008 at 08:18:10PM +, Aaron Denney wrote:
And there is a lot that clearly isn't battle tested in a reasonable new
form, though the current practice is widely agreed upon to be broken.
Examples include all monads having fail, rather than only those in a
subclass, monad not being a subclass of functor, and the whole numeric
hierarchy issue (which I don't think can be properly designed unless we
know whether it's going to be FDs or ATs, though, of course, designing
it for either would provide valuable experience for the limitations
of both),
I don't think any of these need involve multi-parameter type classes
(we don't need vector spaces in the Prelude), but they're often presented
as use cases for things like class aliases. Even then, the numeric
hierarchy is probably easier to fix that the others: one can define a
finer-grain hierarchy with the existing classes as a facade, and leave
clients untouched. The change would be felt by the minority defining
instances of numeric classes, but they are exactly the people who find
the present hierarchy inadequate.
Class aliases (or the ability to add superclasses) would certainly help
in letting many of these things be more easily tested.
I suppose we don't need vector spaces. Nor do we need rationals,
complex numbers, or even arbitrarily large integers. Nevertheless,
there is a huge benefit to having the interfaces for them there.
--
Aaron Denney
--
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime