
Out of curiosity, what ever happened to the proposal a while back to refactor the Num class etc so that the operations would be grouped according to what abstract algebra notions they correspond to?
My understanding was that doing this would make haskell numerics much more sensible. Eg array indexing could be done by any type that is isomorphic to natural numbers etc.
cheers,
-Carter
----- Original Message ----
From: Lennart Augustsson
The differences between Int and Integer operations are mostly constant factors.
well, i will be unlucky if in my real-world program Integers would be used instead of Ints. defaulting provides a great way to solve this dilemma, so good-for-anyone approach may be: default defaulting to Integer instead of Int, and use (Num a) instead of Int in all standard functions such as length. with jhc-like automatic specialization feature this should provide enough speed -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Carter T Schonwald wrote:
Out of curiosity, what ever happened to the proposal a while back to refactor the Num class etc so that the operations would be grouped according to what abstract algebra notions they correspond to?
The numeric prelude proposals have a wiki page: http://www.haskell.org/haskellwiki/Mathematical_prelude_discussion I think it's one of those things that doesn't have enough people itching over it for the collective mind to scratch.

On 2007-07-12, Bryan O'Sullivan
Carter T Schonwald wrote:
Out of curiosity, what ever happened to the proposal a while back to refactor the Num class etc so that the operations would be grouped according to what abstract algebra notions they correspond to?
The numeric prelude proposals have a wiki page:
http://www.haskell.org/haskellwiki/Mathematical_prelude_discussion
I think it's one of those things that doesn't have enough people itching over it for the collective mind to scratch.
Well, that, and people are busy, and how to do some things depends on which of MPTC, Fundeps, AT, etc. make it into Haskell'. I mean, it's obvious it needs to be dealt with, and most everybody agrees on the general shape of things, the big concerns are with how much extra stuff beyond the basics should be defined by Haskell' rather than just enabled by a better numeric hierarchy. -- Aaron Denney -><-
participants (3)
-
Aaron Denney
-
Bryan O'Sullivan
-
Carter T Schonwald