Skip to content

Empty instance

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> 
Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information