
16 May
2007
16 May
'07
1:07 a.m.
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] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH