Yet more on functional dependencies

George Russell ger@tzi.de
Mon, 08 Jan 2001 15:58:06 +0100


I am finding functional dependencies confusing.  (I suspect I am not alone.)
Should the following code work?

class HasConverter a b | a -> b where
   convert :: a -> b

instance (HasConverter a b,Show b) => Show a where
   show value = show (convert value)