[GHC] #8017: Empty instance

#8017: Empty instance -----------------------+---------------------------------------------------- Reporter: wvv | Owner: Type: bug | Status: new Priority: normal | Component: GHCi Version: 7.6.3 | Keywords: Os: Windows | Architecture: x86 Failure: GHCi crash | Blockedby: Blocking: | Related: -----------------------+---------------------------------------------------- Progam {{{ module T1 where data T = T1 | T2 instance Eq T t :: T -> T -> Bool t = (==) }}} use ghci (Windows XP, 32 bit) {{{ GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :cd M:\Haskell Prelude> :load "T1.hs" [1 of 1] Compiling T1 ( T1.hs, interpreted ) Ok, modules loaded: T1. *T1> t T1 T2 *** Exception: stack overflow *T1> }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8017 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8017: Empty instance -----------------------+---------------------------------------------------- Reporter: wvv | Owner: Type: bug | Status: closed Priority: normal | Component: GHCi Version: 7.6.3 | Resolution: duplicate Keywords: | Os: Windows Architecture: x86 | Failure: GHCi crash Blockedby: | Blocking: Related: | -----------------------+---------------------------------------------------- Changes (by monoidal): * status: new => closed * resolution: => duplicate Comment: GHC is technically correct: `T1 == T1` is an infinite loop, since by default `(==)` is implemented via `(/=)` and `(/=)` via `(==)`, so you can write only one of them. Bug #7633 is about detecting this situation. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8017#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC