[Haskell-cafe] Dealing with incoherent instances

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Dec 27 12:02:31 EST 2006

Hello Vyacheslav,

(returning to cafe)

Wednesday, December 27, 2006, 6:10:30 PM, you wrote:

> Ah, so the moment something is passed through a polymorphic function
> its type information is lost... This seems like a bug in the
> specification/implementation, no? This is most certainly not the
> desired behavior. It seems like the compiler has all the information
> it needs but still can't select the right instance.

sorry, but i think that it is how type class system should work in this
case. look at the page for details

> Are there ways to get around this problem?

existential types, for example. we need exact specification of your
problem. "show me the code"

>> are you seen http://haskell.org/haskellwiki/OOP_vs_type_classes ?

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

More information about the Haskell-Cafe mailing list