@@ -223,8 +223,8 @@ instance forall a. Serialize a => Serialize [a] where
223223 -- Inlining this causes large compilation times for tests
224224 {-# INLINABLE deserialize #-}
225225 deserialize off arr sz = do
226− (off1, len) <- deserialize off arr sz :: IO (Int, Int)
227− let
226+ (off1, len64) <- deserialize off arr sz :: IO (Int, Int64)
227+ let len = (fromIntegral :: Int64 -> Int) len64
228228 peekList f o i | i >= 3 = do
229229 -- Unfold the loop three times
230230 (o1, x1) <- deserialize o arr sz
@@ -240,7 +240,7 @@ instance forall a. Serialize a => Serialize [a] where
240240 -- Inlining this causes large compilation times for tests
241241 {-# INLINABLE serialize #-}
242242 serialize off arr val = do
243− void $ serialize off arr (length val)
243+ void $ serialize off arr ((fromIntegral :: Int -> Int64) (length val))
244244 let off1 = off + Unbox.sizeOf (Proxy :: Proxy Int)
245245 let pokeList o [] = pure o
246246 pokeList o (x:xs) = do