Duplicate instance declarations of a methodless class

2007-03-06 Thread mm
Hello, I was thinking that it could maybe be useful to allow duplicate instance declarations, if the class has no methods. From my naive point of view, i can not see problems, scince there are no conflicting methods to choose from. But the following program fails to be compiled by ghc-6.6

Re: Duplicate instance declarations of a methodless class

2007-03-06 Thread Alfonso Acosta
Did you try to compile with -fallow-overlapping-instances On 3/6/07, mm [EMAIL PROTECTED] wrote: Hello, I was thinking that it could maybe be useful to allow duplicate instance declarations, if the class has no methods. From my naive point of view, i can not see problems, scince

Re: Duplicate instance declarations of a methodless class

2007-03-06 Thread mm
that it could maybe be useful to allow duplicate instance declarations, if the class has no methods. From my naive point of view, i can not see problems, scince there are no conflicting methods to choose from. But the following program fails to be compiled by ghc-6.6: {-# OPTIONS -fglasgow-exts

Re: Duplicate instance declarations of a methodless class

2007-03-06 Thread Matthew Brecknell
Alfonso Acosta: Did you try to compile with -fallow-overlapping-instances mm [EMAIL PROTECTED]: Same effect: ghc -fallow-overlapping-instances --make test5.lhs [1 of 1] Compiling Main ( test5.lhs, test5.o ) test5.lhs:22:1: Duplicate instance declarations: instance

Re[2]: Duplicate instance declarations

2005-12-28 Thread Bulat Ziganshin
Hello Ashley, Wednesday, December 28, 2005, 1:56:51 AM, you wrote: instance (CharStream h) = BufStream h where instance (MemoryStream h) = BufStream h where AY Try this: AY class (BufStream h) = CharStream h where AY class (BufStream h) = MemoryStream h where thank you, that will work,

Re[2]: Duplicate instance declarations

2005-12-28 Thread Bulat Ziganshin
Hello Ashley, Wednesday, December 28, 2005, 1:56:51 AM, you wrote: i tried to implement your solution and failed. i will extend my original example to show you my problem: class BufStream h where vPutBuf :: h - Ptr a - Int - IO () class CharStream h where vPutStr :: h - String - IO

Re: Duplicate instance declarations

2005-12-27 Thread Ashley Yakeley
Bulat Ziganshin wrote: Hello all why the folowing is not allowed even with all extensions enabled both in Hugs and GHC? class BufStream h where class CharStream h where instance (CharStream h) = BufStream h where class MemoryStream h where instance (MemoryStream h) = BufStream h where Try