RE: Type checker too lazy

2000-12-19 Thread Simon Peyton-Jones
Thanks for a fine bug report. Really there are two bugs Bug 1: without -fglasgow-exts, this program should be rejected, since Haskell 98 doesn't allow records with polymorphic fields. Your record is really data Record = R { blub :: forall a. Foo a = a - [a] } Bug 2: Assuming

RE: -O Bug

2000-12-19 Thread Simon Peyton-Jones
Thanks for this bug report. I've fixed this in 4.08 (Simon: only in your source tree). It turns out that the HEAD doesn't have the problem. Simon | -Original Message- | From: Axel Krauth [mailto:[EMAIL PROTECTED]] | Sent: 09 December 2000 19:11 | To: [EMAIL PROTECTED] | Subject: -O

Excessive restriction in ghc ?

2000-12-19 Thread Sebastien Carlier
Hello. I am getting an error message from ghc 4.08.1 with the following code: class Collection e ce | ce - e where empty :: ce insert :: e - ce - ce class (Eq e, Collection e ce) = Set e ce where member :: e - ce - Bool union :: ce - ce - ce Main.lhs:7: Class type

Re: Excessive restriction in ghc ?

2000-12-19 Thread Zhanyong Wan
Hi Sebastien, Sebastien Carlier wrote: I am getting an error message from ghc 4.08.1 with the following code: class Collection e ce | ce - e where empty :: ce insert :: e - ce - ce class (Eq e, Collection e ce) = Set e ce where member :: e - ce - Bool union ::

Re: Excessive restriction in ghc ?

2000-12-19 Thread Marcin Kowalczyk
On Tue, Dec 19, 2000 at 03:15:16PM +0100, Sebastien Carlier wrote: class Collection e ce | ce - e where empty :: ce insert :: e - ce - ce class (Eq e, Collection e ce) = Set e ce where Doesn't adding the fundep to Set's definition as well help? -- Marcin 'Qrczak' Kowalczyk

Re: Excessive restriction in ghc ?

2000-12-19 Thread Zhanyong Wan
Marcin Kowalczyk wrote: On Tue, Dec 19, 2000 at 03:15:16PM +0100, Sebastien Carlier wrote: class Collection e ce | ce - e where empty :: ce insert :: e - ce - ce class (Eq e, Collection e ce) = Set e ce where Doesn't adding the fundep to Set's definition as well

RE: Excessive restriction in ghc ?

2000-12-19 Thread Simon Peyton-Jones
Functional dependencies aren't fully implemented in 4.08 I'm afraid, and won't ever be. It'll be significantly better in 5.0, but we won't release that for a while yet. (Unless you care to build from the CVS tree.) Simon | -Original Message- | From: Sebastien Carlier [mailto:[EMAIL

RE: Finding primes using a primes map with Haskell and Hugs98

2000-12-19 Thread Simon Peyton-Jones
| Another way to do this is to compute the final array directly, | instead of computing successive versions of the array: | | import Array | primes n = [ i | i - [2 ..n], not (primesMap ! i)] where | primesMap = accumArray (||) False (2,n) multList | multList= [(m,True)