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]
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