練習問題 2.1.3
型クラスEqの宣言を書き換えて,
(/=)のデフォルト定義を与えよ.
import Prelude hiding (Eq, (==),(/=))
import qualified Prelude as P (Eq, (==), (/=))
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x /= y = not (x == y)
instance Eq Int where
(==) = (P.==)