On 9/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
First of all, there is a version of TypeCast that works within the
same module, please see any code described in
        http://pobox.com/~oleg/ftp/Haskell/typecast.html

Yes, I was aware of that; I gave the shorter version just because it's
shorter.  I didn't realize how well-known this TypeCast is, so forgive
my ignorance.

Thanks for your answer.  I think the real point at which I was
confused is that the type-checker never unifies types in order to
*find* an instance of a class, but functional dependencies of a class
can make it unify types.  Thus, by making the instance look more
general but moving the unification into a TypeCast constraint, since
TypeCast has a bidirectional fundep, we can make the instance match a
pair of types that aren't yet unified, and then use TypeCast's fundep
to force their unification.  Is that right?

Mike
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to