#4089: Empty Show instance + phantom type + GHCi = out of memory
-------------------------+--------------------------------------------------
  Reporter:  japple      |          Owner:        
      Type:  bug         |         Status:  closed
  Priority:  normal      |      Milestone:        
 Component:  GHCi        |        Version:  6.12.2
Resolution:  invalid     |       Keywords:        
Difficulty:              |             Os:  Linux 
  Testcase:              |   Architecture:  x86   
   Failure:  GHCi crash  |  
-------------------------+--------------------------------------------------
Changes (by igloo):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 pumpkin is right: The default `Show` instance includes
 {{{
 show x          = shows x ""
 showsPrec _ x s = show x ++ s
 }}}
 and
 {{{
 shows           =  showsPrec zeroInt
 }}}
 So we have
 {{{
 show M = shows M "" = showsPrec zeroInt M "" = show M ++ ""
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4089#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to