[Haskell-cafe] Re: Re: type class question

Peter Padawitz peter.padawitz at udo.edu
Fri Dec 7 10:57:04 EST 2007


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.



More information about the Haskell-Cafe mailing list