[Haskell-cafe] Type families versus functional dependencies
question
Alexey Rodriguez
mrchebas at gmail.com
Fri Jul 4 04:42:24 EDT 2008
On Fri, Jul 4, 2008 at 5:03 AM, Manuel M T Chakravarty <chak at cse.unsw.edu.au>
wrote:
> The problem is that blah's type is ambiguous, as f does only occur as an
> argument to the type family. If you'd define
>
> class Blah f a where
> blah :: a -> f -> T f f a
>
> (and change the rest of the program accordingly) then all will be fine.
> See this thread for a more in-depth discussion of the problem:
>
> http://www.haskell.org/pipermail/haskell-cafe/2008-April/041385.html
>
Yes, I was afraid that this was the case. However, the question remains on
whether my functional dependencies encoding is correct. A correct encoding
would help me understand this typing problem a bit more. Especially, now
that Claus showed that adding an equality constraint makes this program
work!
Cheers,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080704/787915a4/attachment.htm
More information about the Haskell-Cafe
mailing list