class Eq a where equals :: a -> a -> Bool -- sinngemäß data Foo = ... instance Eq Foo where ... class Eq a => Ord a where compare :: a -> a -> Ordering instance Eq Foo where ...
Beachte:
Typ: Haskell: (data) Java: (class)
Schnittstelle: Haskell: (class) Java: (interface)