#3911: HughesPJ.vcat should behave like 'foldr ($$) empty', not like 'foldr 
($+$)
empty'
---------------------------------+------------------------------------------
    Reporter:  benedikt          |       Owner:                             
        Type:  bug               |      Status:  new                        
    Priority:  normal            |   Component:  libraries/pretty           
     Version:  6.12.1            |    Keywords:                             
          Os:  Unknown/Multiple  |    Testcase:                             
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------
 The performance tuning for libraries/pretty applied in June 2008
 {{{
 Tue Jun 24 12:37:15 BST 2008  [email protected]
   * fillNB bug, lazy vcat
 }}}
 accidentally changed the behavior of vcat to {{{foldr ($+$) empty}}},
 although it should be {{{foldr ($$) empty}}}, according to the
 documentation. Fixing this is simple (patch attached).
 {{{
 hunk ./Text/PrettyPrint/HughesPJ.hs 497
 -vcat = reduceAB . foldr (above_' True) empty
 +vcat = reduceAB . foldr (above_' False) empty
 }}}

 See:

 http://www.haskell.org/pipermail/libraries/2008-December/011032.html
 http://www.haskell.org/pipermail/libraries/2010-March/013067.html

 It would be nice to add a test case, but I'm not sure where to put it.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3911>
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