Îõ³h"¹J     í(c) The University of Glasgow 2001-2009 (c) Giovanni Campagna 2014 BSD-style (see the file LICENSE)libraries@haskell.orgunstablenon-portable (GHC Extensions)NoneÇ  ghc-compactA 0 contains fully evaluated, pure, immutable data. serves two purposes:Data stored in a Ò has no garbage collection overhead. The garbage collector considers the whole À to be alive if there is a reference to any object within it.A È can be serialized, stored, and deserialized again. The serialized data can only be deserialized by the exact binary that created it, but it can be stored indefinitely before deserialization.éCompacts are self-contained, so compacting data involves copying it; if you have data that lives in two /s, each will have a separate copy of the data.ÔThe cost of compaction is fully evaluating the data + copying it. However, because „ does not stop-the-world, retaining internal sharing during the compaction process is very costly. The user can choose whether to  or .When you have a  aÂ, you can get a pointer to the actual object in the region using . The á type serves as handle on the region itself; you can use this handle to add data to a specific  with  or Ç (giving you a new handle which corresponds to the same compact region, but points to the newly added object in the region). At the moment, due to technical reasons, it's not possible to get the  a if you only have an a7, so make sure you hold on to the handle as necessary.òData in a compact doesn't ever move, so compacting data is also a way to pin arbitrary data structures in memory.4There are some limitations on what can be compacted:,Functions. Compaction only applies to data.Pinned ð objects cannot be compacted. This is for a good reason: the memory is pinned so that it can be referenced by address (the address might be stored in a C data structure, for example), so we can't make a copy of it to store in the .*Objects with mutable pointer fields (e.g. , ÷) also cannot be compacted, because subsequent mutation would destroy the property that a compact is self-contained.-If compaction encounters any of the above, a 7 exception will be thrown by the compaction operation. ghc-compact Make a new Ý object, given a pointer to the true underlying region. You must uphold the invariant that a lives in the compact region. ghc-compact Transfer aî into a new compact region, with a preallocated size (in bytes), possibly preserving sharing or not. If you know how big the data structure in question is, you can save time by picking an appropriate block size for the compact region. ghc-compact7Retrieve a direct pointer to the value pointed at by a  reference. If you have used , there may be multiple À references into the same compact region. Upholds the property: "inCompact c (getCompact c) == True ghc-compactCompact a value. O(size of unshared data)³If the structure contains any internal sharing, the shared data will be duplicated during the compaction process. This will not terminate if the structure contains cycles (use  instead).âThe object in question must not contain any functions or data with mutable pointers; if it does, ÿ will raise an exception. In the future, we may add a type class which will help statically check if this is the case or not. ghc-compact=Compact a value, retaining any internal sharing and cycles. O(size of data)(This is typically about 10x slower than â, because it works by maintaining a hash table mapping uncompacted objects to compacted objects.âThe object in question must not contain any functions or data with mutable pointers; if it does, ÿ will raise an exception. In the future, we may add a type class which will help statically check if this is the case or not. ghc-compactAdd a value to an existing Ç. This will help you avoid copying when the value contains pointers into the compact region, but remember that after compaction this value will only be deallocated with the entire compact region.Behaves exactly like 3 with respect to sharing and what data it accepts. ghc-compactAdd a value to an existing , like , but behaving exactly like 3 with respect to sharing and what data it accepts.  ghc-compact2Check if the second argument is inside the passed .  ghc-compact Check if the argument is in any ù. If true, the value in question is also fully evaluated, since any value in a compact region must be fully evaluated.  ghc-compact0Returns the size in bytes of the compact region.  ghc-compact ExperimentalÒ This function doesn't actually resize a compact region; rather, it changes the default block size which we allocate when the current block runs out of space, and also appends a block to the compact region. ghc-compact$Size of the compact region, in bytes ghc-compact"Whether to retain internal sharing   í(c) The University of Glasgow 2001-2009 (c) Giovanni Campagna 2015 BSD-style (see the file LICENSE)libraries@haskell.orgunstablenon-portable (GHC Extensions)NoneÇ8  ghc-compactA serialized version of the „ metadata (each block with address and size and the address of the root). This structure is meant to be sent alongside the actual ” data. It can be sent out of band in advance if the data is to be sent over RDMA (which requires both sender and receiver to have pinned buffers). ghc-compactSerialize the 0, and call the provided function with with the í 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 3 object. For example, it would be unsound to use unsafeInterleaveIO1 to lazily construct a lazy bytestring from the . ghc-compactDeserialize a   into a in-memory Ò. The provided function will be called with the address and size of each newly allocated block in succession, and should fill the memory from the external source (eg. by reading from a socket or from disk)  can return Nothing if the < was corrupt or it had pointers that could not be adjusted. ghc-compactÝConvenience function for importing a compact region that is represented by a list of strict  ByteStrings.         !ghc-compact-0.1.0.0 GHC.CompactGHC.Compact.Serialized Data.IORefIORef GHC.Array MutableArrayControl.ExceptionCompactionFailedCompact mkCompact compactSized getCompactcompactcompactWithSharing compactAddcompactAddWithSharing inCompact isCompact compactSize compactResizeSerializedCompactserializedCompactBlockListserializedCompactRootwithSerializedCompact importCompactimportCompactByteStringsghc-primGHC.Prim ByteArray#baseGHC.PtrPtr