Safe Haskell | None |
---|
- newtype BPListHeader = BPListHeader {}
- data BPListTrailer = BPListTrailer {
- sortVersion :: !Word8
- offsetIntSize :: !Word8
- objectRefSize :: !Word8
- numObjects :: !Word64
- topObject :: !Word64
- offsetTableOffset :: !Word64
- data BPListRecord
- data BPListRecords mode = BPListRecords {}
- readBPListRecords :: ByteString -> Either String (BPListRecords Abs)
- putBPList :: BPListRecords t -> PutM ()
- data Abs
- data Rel
- linearize :: PropertyList -> BPListRecords Abs
- delinearize :: BPListRecords Abs -> PartialPropertyList UnparsedBPListRecord
- absolutize :: BPListRecords Rel -> BPListRecords Abs
- intern :: BPListRecords Abs -> BPListRecords Abs
- data UnparsedBPListRecord
- = UnparsedNull
- | UnparsedFill
- | MissingObjectRef Word64
- | UnparsedDict [Word64] [Word64]
- | UnparsedSet [Word64]
- | UnparsedUID Integer
- readBinaryPartialPropertyList :: ByteString -> Either String (PartialPropertyList UnparsedBPListRecord)
- readBinaryPartialPropertyListFromFile :: FilePath -> IO (PartialPropertyList UnparsedBPListRecord)
- readBinaryPropertyList :: ByteString -> Either String PropertyList
- readBinaryPropertyListFromFile :: FilePath -> IO PropertyList
- encodeBinaryPropertyList :: PropertyList -> ByteString
- writeBinaryPropertyListToFile :: FilePath -> PropertyList -> IO ()
Documentation
newtype BPListHeader Source
data BPListTrailer Source
BPListTrailer | |
|
data BPListRecord Source
data BPListRecords mode Source
PListCoalgebra Maybe (BPListRecords Abs) | |
PListAlgebra Identity (BPListRecords Rel) | |
Eq (BPListRecords mode) | |
Ord (BPListRecords mode) | |
Show (BPListRecords mode) | |
PListCoalgebra (Either UnparsedBPListRecord) (BPListRecords Abs) |
putBPList :: BPListRecords t -> PutM ()Source
linearize :: PropertyList -> BPListRecords AbsSource
Flatten a PropertyList
to a sequence of BPListRecords
. The resulting records will
use absolute addressing and will not have any duplicates.
delinearize :: BPListRecords Abs -> PartialPropertyList UnparsedBPListRecordSource
Reconstruct a property list from a collection of BPListRecords
absolutize :: BPListRecords Rel -> BPListRecords AbsSource
Take some BPListRecords
using relative addressing and change them to use absolute addressing
intern :: BPListRecords Abs -> BPListRecords AbsSource
Take some BPListRecords
using absolute addressing and eliminate
all duplicate records, compact the table and update all internal
references.
Does not necessarily yield a totally deduplicated table; The process of interning can introduce duplicate records (because it alters arrays, dicts and sets). All other node types will be deduplicated in one pass, though, which is usually sufficient.
readBinaryPartialPropertyList :: ByteString -> Either String (PartialPropertyList UnparsedBPListRecord)Source
readBinaryPartialPropertyListFromFile :: FilePath -> IO (PartialPropertyList UnparsedBPListRecord)Source
writeBinaryPropertyListToFile :: FilePath -> PropertyList -> IO ()Source