[Haskell] How to avoid both duplicate instances and extraneous instance declarations?

Robin Bate Boerop robin_bb at acm.org
Sat Apr 22 12:48:39 EDT 2006

This does not work.  The compiler gives the same error with or  
without "-fallow-overlapping-instances".

Robin Bate Boerop

On 22-Apr-06, at 12:39 PM, ihope wrote:

> On 4/22/06, Robin Bate Boerop <robin_bb at acm.org> wrote:
>> I am having trouble making a type system for my EDSL in Haskell.  Can
>> someone help?  A simplified description of my problem follows.
>> I have three classes, A, B1, and B2.  I want all instances of B1 to
>> be instances of A.  I want all instances of B2 to be instances of A.
>> None of the classes have methods.
>> The following does NOT work, because of a duplicate instance
>> declaration for A:
> I think with GHC, you can use the flag -fallow-overlapping-instances,
> and for GHCi, there's :set -fallow-overlapping-instances and then
> :reload.
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

More information about the Haskell mailing list