On May 16, 2007, at 0:57 , Adrian Hey wrote:
-- GT class -- class Ord key => GT map key | map -> key where assocsAscending :: map a -> [(key,a)] -- Just 1 of many methods -- Instances of GT are instances of Eq --
Instances of Ord are instances of Eq, so defining your own instance Eq for a subclass of Ord causes confusion. Specifically, depending on how the value is used, the compiler may not be able to decide between the standard Eq instance or your added one. "Don't do that."
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon university KF8NH _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe