[Haskell-cafe] Re: Numeric type classes (Was: map (-2) [1..5])

Aaron Denney wnoise at ofb.net
Mon Sep 11 12:29:43 EDT 2006


On 2006-09-11, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
> On Sat, 9 Sep 2006, Ross Paterson wrote:
>
>> On Sat, Sep 09, 2006 at 12:57:56AM -0400, Cale Gibbard wrote:
>> > Num itself needs to be split, but we can't do it sanely without
>> > something like class aliases.
>> 
>> I think that a finer grain numeric hierarchy, while retaining Num, etc,
>> is feasible without changing the language: unlike the case of monads,
>> the people who will be defining instances of numeric classes are the
>> very ones who are inconvenienced by the current hierarchy.  The main
>> impact on clients of the classes is that some functions would have
>> more general types.
>
> There are many Num instances around in libraries where people wrap to
> external libraries: functionalMetapost, CSound wrapper in Haskore,
> SuperCollider (GSL too?). What about Num (algebraically Ring) instances of
> polynomials, residue classes and other such advanced mathematical objects?

Yes, they would need to move definitions around.  I think it'd be worth
it for Haskell'.

-- 
Aaron Denney
-><-



More information about the Haskell-Cafe mailing list