[GHC] #10735: Smooth out the differences between `compiler/utils/Pretty.hs` and `libraries/pretty`

GHC ghc-devs at haskell.org
Wed Aug 12 09:23:08 UTC 2015


#10735: Smooth out the differences between `compiler/utils/Pretty.hs` and
`libraries/pretty`
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                   Owner:  thomie
            Type:  task              |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.0.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #1062, #1176,     |  Differential Revisions:
  #7666, #8809                       |  Phab:D1130, Phab:D1132
-------------------------------------+-------------------------------------

Comment (by Thomas Miedema <thomasmiedema@…>):

 In [changeset:"67576ddc67f39bef43c473f30af0887d22011710/ghc"
 67576ddc/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="67576ddc67f39bef43c473f30af0887d22011710"
 Pretty: bugfix fillNB (#10735)

 This is a backport of a bug fix by Benedikt Huber (#2393), from commit
 1e50748beaa4bd2281d323b18ea51c786bba04a1 in the pretty library.

 From https://mail.haskell.org/pipermail/libraries/2008-June/009991.html:

     Law <l1> states that

     > sep (ps++[empty]++qs)   = sep (ps ++ qs)
     >         ...ditto hsep, hcat, vcat, fill...

     In the current implementation, this fails for the paragraph fill
     variants.

     > render' $ fsep [ text "c", text "c",empty, text "c", text "b"]
     >   where render' = renderStyle (Style PageMode 7 1.4)
     >> c c c
     >>     b
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10735#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list