50. class instance
class instance
Eq
class Eq a where
(==), (/=) :: a -> a -> Bool
MyType
instance Eq MyType where
x == y = ...
-- (==) :: MyType -> MyType -> Bool
51. class
Eq
class (Eq a) => Ord a where
(<=) :: a -> a -> Bool Ord
...
52. class
class (Eq a, Show a) => Num a where
(+) :: a -> a -> a
...
Show Eq
Num
53. Read
Show
instance
Typeable
Bounded Ix
Enum Data
Ord Eq
instance
MyType
54. deriving
data deriving
data MyType a b c = A a | B b | C c
deriving (Eq, Ord, Show, Read)
Read
Show
Ord Eq
MyType