monomorphism/hugs98/ghc-5.02.3
Matt Fairtlough
Matt Fairtlough <m.fairtlough@dcs.shef.ac.uk>
Fri, 31 May 2002 18:01:47 +0100 (BST)
Hmm. It might be related but I somehow doubt it. The buggy program is
------------------------------------------
module Bug2 where
data Bug2 = Bug2
instance Show Bug2 where
showsPrec _ Bug2 str = showChar '?' str
------------------------------------------
(stack overflow on Bug2> Bug2)
and the fix is
------------------------------------------
module Bug2 where
data Bug2 = Bug2
instance Show Bug2 where
showsPrec _ Bug2 str = showChar '?' str
------------------------------------------
-- an indentation problem. Quite why globally redefining showsPrec produces
a stack overflow when showing Bug2 values I'll have to leave to the experts.
---------------------------------------------------------------------------
Matt Fairtlough m.fairtlough@dcs.shef.ac.uk
Verification and Testing Group Room 115
Department of Computer Science
University of Sheffield
Regent Court, 211 Portobello Street
Sheffield S1 4DP Tel: (0)114-22-21826
UK Fax: (0)114-22-21810
WWW: http://www.dcs.shef.ac.uk/~matt/
----------------------------------------------------------------------------