[Haskell-cafe] Re: Type question in instance of a class

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Nov 17 13:55:03 EST 2008


Hello Maurí­cio,

Monday, November 17, 2008, 9:38:06 PM, you wrote:

 >> (...) One way to code this would be to use functional dependencies:
 >>
 >> class MyClass r s | r -> s where function :: r -> s

> One additional  problem is that I  (believe I) need that  my class takes
> just  one type

FDs with just one type parameter are called ATs :)

(FDs = functional dependencies, ATs is a new feature of ghc 6.8/6.10)


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list