> This has the code smell of trying to use typeclasses for OOP.  That won't 
work.  (Yes, really.)

I am not trying to use OOP, I am just writing some typecasting at all. 

> This would be correct.  Constraints on an instance are applied *after* the 
instance is selected, so when Haskell is looking for an instance, these two 
are identical.

I didn't understand why these two instances are identical ? The constraints 
are different and OverlappingInstances should permit overlapping typeclasses 
in constraints and select more specific instance clause.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to