
#15652: SerializedCompact has a [(Ptr a, Word)] instead of a custom datatype -------------------------------------+------------------------------------- Reporter: chessai | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: | Version: 8.4.3 libraries/compact | Keywords: ghc-compact, | Operating System: Unknown/Multiple compact regions | Type of failure: Runtime Architecture: aarch64 | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs 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 {{{#!hs 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 {{{#!hs data SerializedCompact a = SerializedCompact { serializedCompactBlockList :: [CompactBlock a] , serializedCompactRoot :: Ptr a } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15652 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler