Haskell 处的实例均衡 -> 非详尽模式

Instance Eq at Haskell -> Non-exhaustive pattern

我正在尝试使用 haskell 声明一个实例,这里我有我的数据类型:

data Classification = Aproved Int
                    | Denied
                    | Missing
                    deriving (Show)

实例声明:

instance Eq Classificacao where
    Denied     == Denied    = True
    Missing    == Missing   = True
    Aproved x  == Aproved y = y==x

当我尝试比较数据构造函数时,如果我在 GHCi Denied==Missing

我该怎么办?我还在学习。

添加最终模式匹配以测试任何其他输入组合,如 False,如下所示:

instance Eq Classification where
Denied     == Denied    = True
Missing    == Missing   = True
Aproved x  == Aproved y = y==x    
x == y = False