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
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
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
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 ::
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
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
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
| 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)