RE: Haskell 2 -- Dependent types?

1999-02-17 Thread michael abbott

As a C++ user (with a background in categories) patiently waiting for
something a lot better, I personally favour two principles:
1.  let's go for undecidable type checking.  I want the compiler to be able
to do as much work as possible: ideally, everything that can be resolved at
compile time should be if only we can express this correctly.
2.  in the face of the above, we need to give the compiler more guidance.
Personally, I favour type declarations everywhere: all identifiers should be
introduced as being of a particular specified type.

Of course, whether these principles are compatible with Haskell it another
question...

-Original Message-
From: Lennart Augustsson [mailto:[EMAIL PROTECTED]]
Sent: 17 February 1999 10:26
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Haskell 2 -- Dependent types?

 I'm not sure that anybody has "accepted"
 undecidable type checking.
People using Gofer or C++ seem to have.

   -- Lennart






Query re gcd() in Haskell 98

1999-02-01 Thread michael abbott

It seems a bit late to raise this, but I notice that the standard prelude
for Haskell 98 in the final draft still defines
gcd 0 0 = error ...

I remember some inconclusive discussion on this some time ago, but there is
no reason not to let gcd 0 0 == 0, as would happen anyway without special
testing.
Regarding the integers =0 as a partial order with a=b when a|b (a divides
b) then gcd a b is the lattice meet of a and b, and 0 is the top element.
Defining gcd 0 x = 0 is consistent with this, for any x.

Michael Abbott