Pretty: remove a harmful $! (#12227)

Authored by thomie on Jul 11 2016, 12:19 PM.



This is backport of [1] for GHC's copy of Pretty. See Note [Differences
between libraries/pretty and compiler/utils/Pretty.hs].


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
thomie updated this revision to Diff 8187.Jul 11 2016, 12:19 PM
thomie retitled this revision from to Pretty: remove a harmful $! (#12227).
thomie updated this object.
thomie edited the test plan for this revision. (Show Details)
thomie updated the Trac tickets for this revision.
thomie updated this revision to Diff 8188.Jul 11 2016, 12:52 PM
thomie edited edge metadata.

Compile-time performance differences:

  • -67% 'bytes allocated' for T12227 (8.0.1 even looped on this one)
  • -3% 'max_bytes_used' for T3294
  • +3% 'bytes allocated' for T3294 (I don't know why, but I'm ignoring it)
thomie added inline comments.Jul 11 2016, 1:02 PM

I didn't add any comments here, because I would like to keep the differences between this module and libraries/pretty as small as possible. The function beside is now exactly the same as it is in pretty (compare

Any regressions will be caught by the regression test.

austin accepted this revision.Jul 11 2016, 2:36 PM
austin edited edge metadata.

Wow, nice catch. I think we should definitely put the milestone on Trac #12227 for 8.0.2 for this one.

This revision is now accepted and ready to land.Jul 11 2016, 2:36 PM
This revision was automatically updated to reflect the committed changes.