HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-compact-0.1.0.0Haskell2010

GHC.Compact.Serialized

This module contains support for serializing a Compact for network transmission and on-disk storage.

Since: 1.0.0

  • 1 type
  • 3 values
valuewithSerializedCompact :: Compact a -> (SerializedCompact a -> IO c) -> IO c
#

Serialize the Compact, and call the provided function with with the Compact serialized representation. It is not safe to return the pointer from the action and use it after the action completes: all uses must be inside this bracket, since we cannot guarantee that the compact region will stay live from the Ptr object. For example, it would be unsound to use unsafeInterleaveIO to lazily construct a lazy bytestring from the Ptr.