[GHC] #7099: 'instance Show' results in stack overflow
GHC
cvs-ghc at haskell.org
Thu Jul 26 10:58:18 CEST 2012
#7099: 'instance Show' results in stack overflow
---------------------------+------------------------------------------------
Reporter: pl | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.2 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Runtime crash | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------+------------------------------------------------
When I load the code below in ghci and run 'create :: C' the execution
ends after a while with a stack overflow. However, when I delete the line
'instance Show C' and erase the '--' before 'deriving (Show)' the command
'create :: C' delivers a 'C' as I would expect it.
> module Main where[[BR]]
>[[BR]]
> data C = C --deriving (Show)[[BR]]
>[[BR]]
> instance Show C[[BR]]
>[[BR]]
> class T m where[[BR]]
> create :: m [[BR]]
>
> instance T C where[[BR]]
> create = C[[BR]]
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7099>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list