[GHC] #1544: Derived Read instances for recursive datatypes with infix constructors are too inefficient

GHC trac at galois.com
Mon Aug 20 21:46:12 EDT 2007


#1544: Derived Read instances for recursive datatypes with infix constructors are
too inefficient
-------------------------------------+--------------------------------------
    Reporter:  jcpetruzza at gmail.com  |        Owner:         
        Type:  bug                   |       Status:  new    
    Priority:  normal                |    Milestone:  6.8    
   Component:  Compiler              |      Version:  6.6.1  
    Severity:  normal                |   Resolution:         
    Keywords:                        |   Difficulty:  Unknown
          Os:  Unknown               |     Testcase:         
Architecture:  Unknown               |  
-------------------------------------+--------------------------------------
Comment (by jcpetruzza at gmail.com):

 Just in case it helps, I'm attaching the Read instance I defined to
 workaround this problem. The idea is to transform this grammar

 {{{
 Exp :== C  |   Exp :+: Exp
 }}}

 into

 {{{
 Exp :== C  (:+: Exp)*
 }}}

 The resulting code is a bit longer, but seems to work fine and doesn't
 depend on any other types

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1544>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list