feat: unpacking

This commit is contained in:
vegowotenks 2025-08-23 19:35:43 +02:00
parent cb99daeb49
commit 32b4b715ed

View file

@ -57,10 +57,10 @@ type ContinuationSerializer a = (SerializerState -> (SerializerState, a))
type Prepends = [StrictText] -> [StrictText] type Prepends = [StrictText] -> [StrictText]
data SerializerState = SerializerState data SerializerState = SerializerState
{ builder :: Prepends { builder :: Prepends -- this laziness is important
, indentation :: !Indentation , indentation :: {-# UNPACK #-} !Indentation
, increaseIndentation :: !(Indentation -> Indentation) , increaseIndentation :: !(Indentation -> Indentation)
, currentFieldIndex :: !(Maybe Word) , currentFieldIndex :: {-# UNPACK #-} !(Maybe Word)
} }
instance Applicative Serializer where instance Applicative Serializer where