[Haskell] How to avoid both duplicate instances and extraneous
ihope127 at gmail.com
Sat Apr 22 12:39:08 EDT 2006
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
More information about the Haskell