22 Apr
2006
22 Apr
'06
6:39 p.m.
On 4/22/06, Robin Bate Boerop <robin_bb@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.