02 Oct 2001 15:16:27 +0300, Dmitry Astapov <[EMAIL PROTECTED]> pisze:

> I need to define SetsAsLists as an instance of Set by supplying
> definitions for all Set methods, but definitions I wrote led me to
> adding additional constraints on "union" and "memeber" methods.

What constraints? The class already says that these operations require
Eq on the element type:

> class Set s where
>             empty :: s a
>             isEmpty :: s a -> Bool
>             singleton :: a -> s a
>             union :: Eq a => s a -> s a -> s a
                       ^^^^
>             member :: Eq a => a -> s a -> Bool
                        ^^^^
>             choice :: s a -> (a, s a)

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK


_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to