Skip to content

SerializedCompact has a [(Ptr a, Word)] instead of a custom datatype

data SerializedCompact a = SerializedCompact
  { serializedCompactBlockList :: [(Ptr a, Word)]
  , serializedCompactRoot :: Ptr a
  }

I'm not sure why the first member of SerializedCompact isn't something like

data CompactBlock a = CompactBlock {-# UNPACK #-} (Ptr a) {-# UNPACK #-} Word

so the Ptr can unpack into the constructor, which isn't possible with (,). SerializedCompact would then look like

data SerializedCompact a = SerializedCompact
  { serializedCompactBlockList :: [CompactBlock a]
  , serializedCompactRoot :: Ptr a
  }
Trac metadata
Trac field Value
Version 8.4.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/compact
Test case
Differential revisions
BlockedBy
Related
Blocking
CC andrewthad, ezyang
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information