Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-11 Thread William Lee Irwin III
On 11-Feb-2001, Brian Boutel <[EMAIL PROTECTED]> wrote: >> There may be some misunderstanding here. If you are talking about type >> for which equality is always undefined, then I agree with you, but that >> is not what I was talking about. I was thinking about types where >> equality is defined f

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-11 Thread Brian Boutel
Marcin 'Qrczak' Kowalczyk wrote: > I'm against removing Eq from the numeric hierarchy, against making Num > instances for functions, but I would probably remove Show. I haven't > seen a sensible proposal of a replacement of the whole hierarchy. > Then we probably are in agreement. --brian _

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-11 Thread William Lee Irwin III
Sun, 11 Feb 2001 13:37:28 +1300, Brian Boutel <[EMAIL PROTECTED]> pisze: >> Can you demonstrate a revised hierarchy without Eq? What would >> happen to Ord and the numeric classes with default class method >> definitions that use (==) either explicitly or in pattern matching >> against numeric lit

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-11 Thread Marcin 'Qrczak' Kowalczyk
Sun, 11 Feb 2001 13:37:28 +1300, Brian Boutel <[EMAIL PROTECTED]> pisze: > Can you demonstrate a revised hierarchy without Eq? What would > happen to Ord and the numeric classes with default class method > definitions that use (==) either explicitly or in pattern matching > against numeric litera

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-10 Thread Fergus Henderson
On 11-Feb-2001, Brian Boutel <[EMAIL PROTECTED]> wrote: > Fergus Henderson wrote: > > > > On 09-Feb-2001, Brian Boutel <[EMAIL PROTECTED]> wrote: > > > Patrik Jansson wrote: > > > > > > > > The fact that equality can be trivially defined as bottom does not imply > > > > that it should be a superc

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-10 Thread Brian Boutel
Fergus Henderson wrote: > > On 09-Feb-2001, Brian Boutel <[EMAIL PROTECTED]> wrote: > > Patrik Jansson wrote: > > > > > > The fact that equality can be trivially defined as bottom does not imply > > > that it should be a superclass of Num, it only explains that there is an > > > ugly way of worki

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-10 Thread Brian Boutel
Marcin 'Qrczak' Kowalczyk wrote: > > Sat, 10 Feb 2001 14:09:59 +1300, Brian Boutel <[EMAIL PROTECTED]> pisze: > > > Can you demonstrate a revised hierarchy without Eq? What would happen to > > Ord, and the numeric classes that require Eq because they need signum? > > signum doesn't require Eq.

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Marcin 'Qrczak' Kowalczyk
Sat, 10 Feb 2001 14:09:59 +1300, Brian Boutel <[EMAIL PROTECTED]> pisze: > Can you demonstrate a revised hierarchy without Eq? What would happen to > Ord, and the numeric classes that require Eq because they need signum? signum doesn't require Eq. You can use signum without having Eq, and you c

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Fergus Henderson
On 09-Feb-2001, Brian Boutel <[EMAIL PROTECTED]> wrote: > Patrik Jansson wrote: > > > > The fact that equality can be trivially defined as bottom does not imply > > that it should be a superclass of Num, it only explains that there is an > > ugly way of working around the problem. ... > > There i

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Brian Boutel
Ketil Malde wrote: > > Brian Boutel <[EMAIL PROTECTED]> writes: > > > - Having a class hierarchy at all (or making any design decision) > > implies compromise. > > I think the argument is that we should move Eq and Show *out* of the > Num hierarchy. Less hierarchy - less compromise. Can you

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Ketil Malde
Brian Boutel <[EMAIL PROTECTED]> writes: >> The fact that equality can be trivially defined as bottom does not imply >> that it should be a superclass of Num, it only explains that there is an >> ugly way of working around the problem. > There is nothing trivial or ugly about a definition that r

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-08 Thread Brian Boutel
Patrik Jansson wrote: > > On Wed, 7 Feb 2001, Brian Boutel wrote: > > * Haskell equality is a defined operation, not a primitive, and may not > > be decidable. It does not always define equivalence classes, because > > a==a may be Bottom, so what's the problem? It would be a problem, > > though, t

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-07 Thread Jerzy Karczmarczuk
"Ch. A. Herrmann" answers my questions: > Jerzy> What do you mean "predefined" operators? Predefined where? > > In hugs, ":t (*)" tells you: >(*) :: Num a => a -> a -> a > which is an intended property of Haskell, I suppose. Aha. But I would never call this a DEFINITION of this operator

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-07 Thread Ch. A. Herrmann
Hi Haskellers, > "Jerzy" == Jerzy Karczmarczuk <[EMAIL PROTECTED]> writes: Jerzy> "Ch. A. Herrmann" wrote: >> the problem is that the --majority, I suppose?-- of >> mathematicians tend to overload operators. They use "*" for >> matrix-matrix multiplication as well as for matr

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-07 Thread Jerzy Karczmarczuk
Patrik Jansson wrote: > [I am not sure a more mathematically correct numeric class system is > suitable for inclusion in the language specification of Haskell (a > library would certainly be useful though)] I think it should be done at the language level. Previously Brian Boutel wrote: ...

Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-06 Thread Patrik Jansson
{I'm diverting this discussion to haskell-cafe.} [I am not sure a more mathematically correct numeric class system is suitable for inclusion in the language specification of Haskell (a library would certainly be useful though). But this is not my topic in this letter.] On Wed, 7 Feb 2001, Brian B