Deriving Eq on bottom types breaks reflexivity of (==)
Related to #4220 (closed) and #4302 (closed).
{-# LANGUAGE EmptyDataDecls, StandaloneDeriving #-}
data Z
deriving instance Eq Z
g :: Z
g = g
main :: IO ()
main = print (g == g)
Observed output ((==) not reflexive anymore?):
False
Expected output (this is what TcGenDeriv.mkRdrFunBind does for Show etc.):
"*** Exception: Void (==)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.0.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |