From 729dddc3c519ccc515957a7ebf21802c56d67a8c Mon Sep 17 00:00:00 2001 From: Andreas Klebinger Date: Tue, 30 Nov 2021 15:44:31 +0100 Subject: Try making textBeside_ strict in the third arg. 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 ------------------------- --- compiler/GHC/Utils/Ppr.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1