Skip to content

Commit aaeb74b

Browse files
committed
Don't unpack Text fields
We don't actually scrutinize these so often.
1 parent 42bd794 commit aaeb74b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ data Doc ann =
9797
--
9898
-- Since the frequently used 'T.length' of 'Text' is /O(length)/, we cache
9999
-- it in this constructor.
100-
| Text !Int {-# UNPACK #-} !Text
100+
| Text !Int !Text
101101

102102
-- | Hard line break
103103
| Line
@@ -1452,7 +1452,7 @@ data SimpleDocStream ann =
14521452
-- | Some layout algorithms use the Since the frequently used 'T.length' of
14531453
-- the 'Text', which scales linearly with its length, we cache it in this
14541454
-- constructor.
1455-
| SText !Int {-# UNPACK #-} !Text (SimpleDocStream ann)
1455+
| SText !Int !Text (SimpleDocStream ann)
14561456

14571457
-- | @Int@ = indentation level for the (next) line
14581458
| SLine !Int (SimpleDocStream ann)

0 commit comments

Comments
 (0)