Hi Jeff, Jeff Heard wrote:
instance Region a => Eq a where regiona == regionb = all $ zipWith (==) (bounds regiona) (bounds regionb)
If you want to be Haskell98 compliant, why not define regionEquals :: Region a => a -> a -> Bool as above and use that everywhere instead of (==)?
If you insist on using the overloaded (==), then in Haskell98 you will need to define individual Eq instances for all your custom region types. However, you can simply define (==) = regionEquals for all those types.
Hope this helps, Martijn. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe