| With overlapping instances, I'm allowed | | class OK x y | | instance Functor f => OK (f x) (f y) | | instance Functor f => OK x (f y) | | but I'm not allowed | | class Bad x y z | x y -> z | | instance Functor f => Bad (f x) (f y) Bool | | instance Functor f => Bad x (f y) Int | | I don't quite see why. Naively, I imagine that if the OK instances are | effectively prioritized, then Bad's rules for computing z from x and y | could be similarly prioritized. Can anyone explain why this naive | imagining is incorrect?
I don't think anyone has really worked through the interaction of overlapping instances (already swampy) with functional dependencies. What you say makes sense, but it's not what GHC or Hugs implement. Maybe they should Simon _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell