Greetings.
What is the difference between the following two
scenarios:
1)
class Eq a where
(==) :: a -> a ->
Bool
class Eq a => Ord a where
( < ) :: a -> a ->
Bool
2)
class Eq a where
(==) :: a -> a ->
Bool
class Ord a where
(eq),( < ) :: a -> a ->
Bool
instance Ord a => Eq a where
(==) = eq
eq is just a rename for == to avoid the
nameclash
The second scenario resembles Russell's Paradox.
Typeclass of a typeclass. Anyhow we are loosing orthogonality here.
Thanks