Re: [GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-23 Thread GHC
#4089: Empty Show instance + phantom type + GHCi = out of memory
---+
Reporter:  japple  |   Owner:
Type:  bug |  Status:  new   
Priority:  normal  |   Component:  GHCi  
 Version:  6.12.2  |Keywords:
  Os:  Linux   |Testcase:
Architecture:  x86 | Failure:  GHCi crash
---+

Comment(by pumpkin):

 This is just like doing

 {{{
 instance Eq M
 }}}

 and having a call to (==) loop between (/=) and (==) infinitely. show
 calls shows which calls showsPrec which calls show. I don't think this is
 a bug.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4089#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-23 Thread GHC
#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
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-22 Thread GHC
#4089: Empty Show instance + phantom type + GHCi = out of memory
---+
Reporter:  japple  |   Owner:
Type:  bug |  Status:  new   
Priority:  normal  |   Component:  GHCi  
 Version:  6.12.2  |Keywords:
  Os:  Linux   |Testcase:
Architecture:  x86 | Failure:  GHCi crash
---+
 {{{
 module ShowMemory where

 data M a = M

 instance Show a = Show (M a)
 }}}

 Load in GHCi, type M and then enter at the prompt.

 It kills all my memory. I have no .ghci

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4089
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-22 Thread GHC
#4089: Empty Show instance + phantom type + GHCi = out of memory
---+
Reporter:  japple  |   Owner:
Type:  bug |  Status:  new   
Priority:  normal  |   Component:  GHCi  
 Version:  6.12.2  |Keywords:
  Os:  Linux   |Testcase:
Architecture:  x86 | Failure:  GHCi crash
---+

Comment(by pumpkin):

 I get the same behavior on Mac OS 10.5, using 6.12.1, also no .ghci.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4089#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs