[Haskell-cafe] Defining methods generically for a class

Cristiano Paris frodo at theshire.org
Thu Jan 8 12:16:53 EST 2009


On Thu, Jan 8, 2009 at 6:04 PM, Jeff Heard <jefferson.r.heard at gmail.com> wrote:
> ...
> How do I declare all Regions to be Eqs without putting it in the class
> body (since I define a function over all Regions that is independent
> of datatype that is an instance of Region)?

Would this be a solution?

class Eq a => Region a where
  ...

Cristiano


More information about the Haskell-Cafe mailing list