Re: [Haskell] Forcing Type Class Equality

2006-06-29 Thread Gerrit van den Geest
Hi John, NB the essence what I am trying to do is to define a proxy class Foo for class Ba1 I would have thought that something as simple as the following would have worked ?? class Ba1 a where dosomething :: a -> IO () ba1 :: Ba1 a => a -> IO () ba1 x = dosomething x instance Ba1 Int w

Re: [Haskell] How to avoid both duplicate instances and extraneousinstance declarations?

2006-04-22 Thread Gerrit van den Geest
m remains. -- Robin Bate Boerop On 22-Apr-06, at 2:01 PM, Gerrit van den Geest wrote: Robin, The following does NOT work, because of a duplicate instance declaration for A: class A a class B1 b1 class B2 b2 instance B1 x => A x instance B2 x => A x -- duplicate instance, won't c

Re: [Haskell] How to avoid both duplicate instances and extraneousinstance declarations?

2006-04-22 Thread Gerrit van den Geest
m remains. -- Robin Bate Boerop On 22-Apr-06, at 2:01 PM, Gerrit van den Geest wrote: Robin, The following does NOT work, because of a duplicate instance declaration for A: class A a class B1 b1 class B2 b2 instance B1 x => A x instance B2 x => A x -- duplicate instance, won't c

Re: [Haskell] How to avoid both duplicate instances and extraneousinstance declarations?

2006-04-22 Thread Gerrit van den Geest
Robin, The following does NOT work, because of a duplicate instance declaration for A: class A a class B1 b1 class B2 b2 instance B1 x => A x instance B2 x => A x -- duplicate instance, won't compile data T = T instance B1 T Yes, this doesn't work and I think there is no GHC extension that