;t      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs Portability :"Trevor Elliott <trevor@galois.com>NoneA # is an efficient way to build lazy ts. . There are several functions for constructing s, but only one G to inspect them: to extract any data, you have to turn them into lazy  ts using . Internally, a  constructs a lazy  by filling byte 9 arrays piece by piece. As each buffer is filled, it is 'popped' 2 off, to become a new chunk of the resulting lazy t. ) All this is hidden from the user of the . O(1). The empty Builder, satisfying    = uO(1)., A Builder taking a single byte, satisfying   ( b) = v bO(1).= The concatenation of two Builders, an associative operation  with identity  , satisfying   ( x y) = w ( x) ( y)O(1). A Builder taking a x , satisfying   ( bs) = y [bs]O(1). A Builder taking a lazy t , satisfying   ( bs) = bsO(n). Extract a lazy t from a . D The construction work takes place if and when the relevant part of  the lazy t is demanded. O(1). Pop the x% we have constructed so far, if any, ) yielding a new chunk in the result lazy t. z'Sequence an IO operation on the buffer {Get the size of the buffer |'Map the resulting list of bytestrings. }Ensure that there are at least n many bytes available. ~ Ensure that n( many bytes are available, and then use f to write some  bytes into the memory.  Ensure that n( many bytes are available, and then use f to write some " storable values into the memory. $Write a Word16 in big endian format 'Write a Word16 in little endian format $Write a Word32 in big endian format 'Write a Word32 in little endian format $Write a Word64 in big endian format 'Write a Word64 in little endian format O(1).< A Builder taking a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. 9Write a Word16 in native host order and host endianness. % 2 bytes will be written, unaligned. 9Write a Word32 in native host order and host endianness. % 4 bytes will be written, unaligned. %Write a Word64 in native host order. J On a 32 bit machine we write two host order Word32s, in big endian form. % 8 bytes will be written, unaligned. %z{|}~   "z{|}~  Portability :"Trevor Elliott <trevor@galois.com>None=Put merely lifts Builder into a Writer monad, applied to (). AThe PutM type. A Writer monad over the efficient Builder monoid. Run the  monad Run the  monad with a serialiser Run the , monad with a serialiser and get its result Run the  monad with a serialiser Run the  monad with a serialiser BPop the ByteString we have constructed so far, if any, yielding a % new chunk in the result ByteString. 0Efficiently write a byte into the output buffer LAn efficient primitive to write a strict ByteString into the output buffer. J It flushes the current buffer, and writes the argument into a new chunk. !?Write a lazy ByteString efficiently, simply appending the lazy ( ByteString chunks to the output buffer "$Write a Word16 in big endian format #'Write a Word16 in little endian format $$Write a Word32 in big endian format %'Write a Word32 in little endian format &$Write a Word64 in big endian format ''Write a Word64 in little endian format (O(1).1 Write a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. )O(1).: Write a Word16 in native host order and host endianness.  For portability issues see  putWordhost. *O(1).: Write a Word32 in native host order and host endianness.  For portability issues see  putWordhost. +O(1).% Write a Word64 in native host order J On a 32 bit machine we write two host order Word32s, in big endian form.  For portability issues see  putWordhost. , !"#$%&'()*+,-./0123456$ !"#$%&'()*+,-./0123456$ !"$&#%'()*+,-./0123456) !"#$%&'()*+,-./0123456 Portability :"Trevor Elliott <trevor@galois.com>None/"Have we read all available input? 7/The Get monad is an Exception and State monad. 8The result of a parse. 9The parse succeeded. The x is the 6 input that had not yet been consumed (if any) when  the parse succeeded. :1Supply this continuation with more input so that 3 the parser can resume. To indicate that no more  input is available, use an  string. ;The parse failed. The  is the ) message describing the error, if any. =Run the Get monad applies a &-based parser on the input ByteString >Run the Get monad applies a &-based parser on the input ByteString ?Run the Get monad applies a -based parser on the input F ByteString. Additional to the result of get it returns the number of + consumed bytes and the rest of the input. Run the Get monad applies a -based parser on the input F ByteString. Additional to the result of get it returns the number of K consumed bytes and the rest of the input, even in the event of a failure. @KRun the Get monad over a Lazy ByteString. Note that this will not run the : Get parser lazily, but will operate on lazy ByteStrings. AKRun the Get monad over a Lazy ByteString. Note that this does not run the : Get parser lazily, but will operate on lazy ByteStrings. B If at least n2 bytes of input are available, return the current  input, otherwise fail.  If at least n2 bytes of input are available, return the current  input, otherwise fail. CJIsolate an action to operating within a fixed block of bytes. The action @ is required to consume all the bytes that it is isolated to. $Immediately demand more input via a : continuation  result. D Skip ahead n bytes. Fails if fewer than n bytes are available. E Skip ahead n bytes. No error if there isn't enough bytes. FRun ga*, but return without consuming its input.  Fails if ga fails. GLike F, but consume the input if gma returns 'Just _'.  Fails if gma fails. HLike F, but consume the input if gea returns 'Right _'.  Fails if gea fails. IGet the next up to n0 bytes as a ByteString, without consuming them. JIGet the number of remaining unparsed bytes. Useful for checking whether  all input has been consumed. WARNING: when run with  runGetPartial(, remaining will only return the number 3 of bytes that are remaining in the current input. K*Test whether all input has been consumed. WARNING: when run with  runGetPartial#, isEmpty will only tell you if you're " at the end of the current chunk. L An efficient / method for strict ByteStrings. Fails if fewer  than n< bytes are left in the input. This function creates a fresh  copy of the underlying bytes. NPull n/ bytes from the input, as a strict ByteString. O"Read a Word8 from the monad state P#Read a Word16 in big endian format Q&Read a Word16 in little endian format R#Read a Word32 in big endian format S&Read a Word32 in little endian format T#Read a Word64 in big endian format U&Read a Word64 in little endian format VO(1).8 Read a single native machine word. The word is read in 2 host order, host endian form, for the machine you're on. On a 64 bit D machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. WO(1).@ Read a 2 byte Word16 in native host order and host endianness. XO(1).9 Read a Word32 in native host order and host endianness. YO(1).8 Read a Word64 in native host order and host endianess. [$Get a list in the following format:  Word64 (big endian format)  element 1  ...  element n \'Get an IArray in the following format:  index (lower bound)  index (upper bound)  Word64 (big endian format)  element 1  ...  element n ](Get a sequence in the following format:  Word64 (big endian format)  element 1  ...  element n ^Read as a list of lists. _,Read as a list of pairs of key and element. `,Read as a list of pairs of int and element. aRead as a list of elements. bRead as a list of ints. c)Read in a Maybe in the following format: 1 Word8 (0 for Nothing, anything else for Just)  element (when Just) d)Read an Either, in the following format: / Word8 (0 for Left, anything else for Right) ) element a when 0, element b otherwise O789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd.789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd.7=@?A8;:9>BC<DEFGHINJKOLMPRTQSUVWXYZ[\^]_`abcdH78;:9<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdNonee.Read a Float in little endian IEEE-754 format f+Read a Float in big endian IEEE-754 format g/Read a Double in little endian IEEE-754 format h,Read a Double in big endian IEEE-754 format i/Write a Float in little endian IEEE-754 format j,Write a Float in big endian IEEE-754 format k0Write a Double in little endian IEEE-754 format l-Write a Double in big endian IEEE-754 format efghijklefghijklefghijkl efghijkl Portability :"Trevor Elliott <trevor@galois.com>Nonem%If your compiler has support for the  DeriveGeneric and  DefaultSignatures language extensions ( ghc >= 7.2.1), the n and o 4 methods will have default generic implementations. !To use this option, simply add a  deriving  clause to your datatype  and declare a m1 instance for it without giving a definition for  n and o. n!Encode a value in the Put monad. o Decode a value in the Get monad pBEncode a value using binary serialization to a strict ByteString. q@Encode a value using binary serialization to a lazy ByteString. rEDecode a value from a strict ByteString, reconstructing the original  structure. sCDecode a value from a lazy ByteString, reconstructing the original  structure. Rmnopqrsa !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsmnopqrsImnopqrs      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrps ps ps ptrpsuvwxyz{||}~p k|3 jcereal-0.4.0.0Data.Serialize.BuilderData.Serialize.PutData.Serialize.GetData.Serialize.IEEE754Data.SerializeL BytestringBuilderempty singletonappendfromByteStringfromLazyByteString toByteStringtoLazyByteStringflush putWord16be putWord16le putWord32be putWord32le putWord64be putWord64le putWordhost putWord16host putWord32host putWord64hostPutterPutPutMunPut putBuilderexecPutrunPutrunPutM runPutLazy runPutMLazyputWord8 putByteStringputLazyByteStringputTwoOf putListOf putIArrayOfputSeqOf putTreeOfputMapOf putIntMapOfputSetOf putIntSetOf putMaybeOf putEitherOfGetResultDonePartialFaillabelrunGet runGetPartial runGetState runGetLazyrunGetLazyStateensureisolateskip uncheckedSkip lookAhead lookAheadM lookAheadEuncheckedLookAhead remainingisEmpty getByteStringgetLazyByteStringgetBytesgetWord8 getWord16be getWord16le getWord32be getWord32le getWord64be getWord64le getWordhost getWord16host getWord32host getWord64hostgetTwoOf getListOf getIArrayOfgetSeqOf getTreeOfgetMapOf getIntMapOfgetSetOf getIntSetOf getMaybeOf getEitherOf getFloat32le getFloat32be getFloat64le getFloat64be putFloat32le putFloat32be putFloat64le putFloat64be Serializeputgetencode encodeLazydecode decodeLazybytestring-0.10.2.0Data.ByteString.Lazy.Internal ByteStringData.ByteString.LazyData.ByteString.Internal fromChunks unsafeLiftIOwithSize mapBuilder ensureFreewriteN writeNbytesBuffer runBuilder defaultSize writeNBuffer newBufferwriteNBufferBytes shiftr_w16 shiftr_w32 shiftr_w64$fMonoidBuilderPairSsndStell encodeListOf $fMonadPutM$fApplicativePutM $fFunctorPutMMoreData.ByteStringbaseGHC.BaseString runGetState' ensureRec demandInput IncompleteCompleteSuccessFailureInputunGet bufferBytes moreLength formatTracefinalKfailK runGetLazy'failDescgetPtr shiftl_w16 shiftl_w32 shiftl_w64$fMonadPlusGet $fMonadGet$fAlternativeGet$fApplicativeGet $fFunctorGet$fFunctorResult $fShowResult wordToFloat floatToWord wordToDouble doubleToWordcast GHC.GenericsGenericTaggedunTaggedSumSizesumSizeGetSumgetSumPutSumputSum GSerializegPutgGetSmallIntunrollroll sizeError checkGetSum $fSumSizeM1 $fSumSize:+: $fGetSumM1 $fGetSum:+: $fPutSumM1 $fPutSum:+:$fGSerialize:+:$fGSerialize:*:$fGSerializeU1$fGSerializeK1$fGSerializeM1$fSerializeUArray$fSerializeArray$fSerializeTree$fSerializeFloat$fSerializeDouble$fSerializeSeq$fSerializeIntMap$fSerializeIntSet$fSerializeMap$fSerializeSet$fSerializeByteString$fSerializeByteString0$fSerializeEither$fSerializeMaybe $fSerialize[]$fSerializeLast$fSerializeFirst$fSerializeProduct$fSerializeSum$fSerializeAny$fSerializeAll$fSerializeDual$fSerialize(,,,,,,,,,)$fSerialize(,,,,,,,,)$fSerialize(,,,,,,,)$fSerialize(,,,,,,)$fSerialize(,,,,,)$fSerialize(,,,,)$fSerialize(,,,)$fSerialize(,,)$fSerialize(,)$fSerializeChar$fSerializeRatio$fSerializeInteger$fSerializeInt$fSerializeWord$fSerializeInt64$fSerializeInt32$fSerializeInt16$fSerializeInt8$fSerializeWord64$fSerializeWord32$fSerializeWord16$fSerializeWord8$fSerializeOrdering$fSerializeBool $fSerialize()