[GHC] #1337: Fix wrong indentation from
Text.PrettyPrint.HughesPJ fill (fcat and fsep)
GHC
trac at galois.com
Mon May 7 06:09:35 EDT 2007
#1337: Fix wrong indentation from Text.PrettyPrint.HughesPJ fill (fcat and fsep)
-------------------------------+--------------------------------------------
Reporter: thorkilnaur | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase: pp2
Architecture: Unknown |
-------------------------------+--------------------------------------------
Comment (by simonpj):
Thank you very much for looking into this Thorkil. It is now several
years since I wrote that code, and it is fully paged out of my cache.
That makes you the current expert!
Suggestion:
* While it's still in ''your'' cache, make a dozen or so evil tests.
* Implement your fix in GHC's pretty-print module and check that it
doesn't make GHC's current output go pear-shaped. (E.g. run the test
suite and compare output.)
If it looks as if there are no regressions, then let us know and we'll
commit your patches.
Incidentally, there's a comment in `Text.PrettyPrint.HughesPJ`:
{{{
-- Specification:
-- fill [] = empty
-- fill [p] = p
-- fill (p1:p2:ps) = oneLiner p1 <#> nest (length p1)
-- (fill (oneLiner p2 : ps))
-- `union`
-- p1 $$ fill ps
}}}
If you change the code, could you change the comment, if appropriate. And
could you add a comment or two to explain the importance of your call to
`oneLinerNB` instead of `oneLiner`. These things are all too easily
forgotten!
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1337>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list