From 32b4b715ed25b04364341fbb5fe802364edabff5 Mon Sep 17 00:00:00 2001 From: VegOwOtenks Date: Sat, 23 Aug 2025 19:35:43 +0200 Subject: [PATCH] feat: unpacking --- src/Pretty/Serialize.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Pretty/Serialize.hs b/src/Pretty/Serialize.hs index 3ef4206..5a7a767 100644 --- a/src/Pretty/Serialize.hs +++ b/src/Pretty/Serialize.hs @@ -57,10 +57,10 @@ type ContinuationSerializer a = (SerializerState -> (SerializerState, a)) type Prepends = [StrictText] -> [StrictText] data SerializerState = SerializerState - { builder :: Prepends - , indentation :: !Indentation + { builder :: Prepends -- this laziness is important + , indentation :: {-# UNPACK #-} !Indentation , increaseIndentation :: !(Indentation -> Indentation) - , currentFieldIndex :: !(Maybe Word) + , currentFieldIndex :: {-# UNPACK #-} !(Maybe Word) } instance Applicative Serializer where