diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-11-30 15:44:31 +0100 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2022-05-13 19:06:10 +0200 |
commit | 729dddc3c519ccc515957a7ebf21802c56d67a8c (patch) | |
tree | 12ca784be64d083857f10dc5c11b00fcae666ac7 | |
parent | 2c00a8d0ba4bc37e212a723fc025f83c471986c5 (diff) | |
download | haskell-wip/andreask/ppr_bang.tar.gz |
Try making textBeside_ strict in the third arg.wip/andreask/ppr_bang
It seems this causes quite a few thunks. Which all end up being forced anyway.
So I just made the field of the constructor strict instead.
-------------------------
Metric Decrease:
CoOpt_Read
ManyAlternatives
ManyConstructors
T10421
T12425
T12707
T13035
T13056
T13253
T13379
T14683
T15164
T15703
T16577
T18140
T18282
T18304
T18698a
T18698b
T18923
T1969
T19695
T20049
T3064
T3294
T4801
T5321FD
T5321Fun
T5631
T5642
T6048
T783
T9198
T9233
T9961
WWRec
Metric Increase:
InstanceMatching
T12227
-------------------------
-rw-r--r-- | compiler/GHC/Utils/Ppr.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Utils/Ppr.hs b/compiler/GHC/Utils/Ppr.hs index af2b6f977a..7448d4a472 100644 --- a/compiler/GHC/Utils/Ppr.hs +++ b/compiler/GHC/Utils/Ppr.hs @@ -215,7 +215,7 @@ infixl 5 $$, $+$ data Doc = Empty -- empty | NilAbove Doc -- text "" $$ x - | TextBeside !TextDetails {-# UNPACK #-} !Int Doc -- text s <> x + | TextBeside !TextDetails {-# UNPACK #-} !Int !Doc -- text s <> x | Nest {-# UNPACK #-} !Int Doc -- nest k x | Union Doc Doc -- ul `union` ur | NoDoc -- The empty set of documents |