
7 Dec
2007
7 Dec
'07
10:57 a.m.
Jules Bean wrote:
Peter Padawitz wrote:
Functional dependencies don't work in my case. Actually, I don't see why they should.
Ah well, it's cruel to say that without explaining to us why!
Cause I don't see why the instantiation conflicts pointed out by others would vanish then.
I'm not sure why a complete cyclic dep a -> b -> c -> d -> a isn't what you want.
What seems to be needed here is a type class construct with a kind of record parameter so that instance conflicts cannot occur.
I'm not entirely sure what you intend to mean by this, but if you mean what I guess you mean:
class Java (a,b,c,d) where ....
Yeah... but ghc accepts only type variables here, not arbitrary polymorphic types.