h&kXa      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        (c) Ben Gamari 2017-2018BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-InferredrcborgmkByteArray n xs forms a  with contents xs . Note that n must be the precise length of xs.cborg'A conservative estimate of pinned-ness.cborgoffsetcborglengthcborgarray(c) Ben Gamari 2017-2018BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred ] cborg"Note that this may require a copy.   (c) Ben Gamari 2017-2018BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred  %  (c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred)cborgA 0-based offset within the overall byte sequence that makes up the input to the q. This is an  since q is incremental and can decode more data than fits in memory at once. This is also compatible with the result type of  .cborgThe type of a token, which a decoder can ask for at an arbitrary time.9cborgAn action, representing a step for a decoder to taken and a continuation to invoke with the expected value.qcborgA continuation-based decoder, used for decoding values that were previously encoded using the Codec.CBOR.Encoding module. As q has a ! instance, you can easily write q7s monadically for building your deserialisation logic.rcborgLift an ST action into a Decoder. Useful for, e.g., leveraging in-place mutation to efficiently build a deserialised value.scborgGiven a q, give us the 9tcborg Decode a .ucborg Decode a .vcborg Decode a .wcborg Decode a .xcborg Decode a .ycborgDecode a negative .zcborgDecode a negative .{cborg Decode an .|cborg Decode an .}cborg Decode an .~cborg Decode an .cborg Decode an .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a .cborg.Decode canonical representation of a negative .cborg.Decode canonical representation of a negative .cborg&Decode canonical representation of an .cborg&Decode canonical representation of an .cborg&Decode canonical representation of an .cborg&Decode canonical representation of an .cborg&Decode canonical representation of an .cborg Decode an .cborg Decode a .cborg Decode a .cborgDecode a string of bytes as a .cborg:Decode canonical representation of a string of bytes as a .cborgDecode a token marking the beginning of an indefinite length set of bytes.cborgDecode a string of bytes as a .Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the  is live but not forced.cborg:Decode canonical representation of a string of bytes as a .Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the  is live but not forced.cborg&Decode a textual string as a piece of .cborgDecode canonical representation of a textual string as a piece of .cborgDecode a token marking the beginning of an indefinite length string.cborg)Decode a textual string as UTF-8 encoded . Note that the result is not validated to be well-formed UTF-8.Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the  is live but not forced.cborgDecode canonical representation of a textual string as UTF-8 encoded . Note that the result is not validated to be well-formed UTF-8.Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the  is live but not forced.cborgDecode the length of a list.cborg8Decode canonical representation of the length of a list.cborgDecode a token marking the beginning of a list of indefinite length.cborgDecode the length of a map.cborg7Decode canonical representation of the length of a map.cborgDecode a token marking the beginning of a map of indefinite length.cborg+Decode an arbitrary tag and return it as a .cborg2Decode an arbitrary 64-bit tag and return it as a .cborgDecode canonical representation of an arbitrary tag and return it as a .cborgDecode canonical representation of an arbitrary 64-bit tag and return it as a .cborgDecode a bool.cborg0Decode a nullary value, and return a unit value.cborg Decode a simple CBOR value and give back a ,. You probably don't ever need to use this.cborg&Decode canonical representation of an .cborg4Decode canonical representation of a half-precision .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a .cborg%Decode canonical representation of a simple CBOR value and give back a +. You probably don't ever need to use this.cborgAttempt to decode a word with t7, and ensure the word is exactly as expected, or fail.cborg&Attempt to decode a list length using :, and ensure it is exactly the specified length, or fail.cborg:Attempt to decode canonical representation of a word with 7, and ensure the word is exactly as expected, or fail.cborgAttempt to decode canonical representation of a list length using :, and ensure it is exactly the specified length, or fail.cborgAttempt to decode a token for the length of a finite, known list, or an indefinite list. If  is returned, then an indefinite length list occurs afterwords. If  x% is returned, then a list of length x is encoded.cborgAttempt to decode a token for the length of a finite, known map, or an indefinite map. If  is returned, then an indefinite length map occurs afterwords. If  x$ is returned, then a map of length x is encoded.cborgAttempt to decode a Break, token, and if that was successful, return .. If the token was of any other type, return .cborg?Peek at the current token we're about to decode, and return a  specifying what it is.cborgPeek and return the length of the current buffer that we're running our decoder on.cborgGet the current # in the input byte sequence of the q.The q does not provide any facility to get at the input data directly (since that is tricky with an incremental decoder). The next best is this primitive which can be used to keep track of the offset within the input bytes that makes up the encoded form of a term.By keeping track of the byte offsets before and after decoding a subterm (a pattern captured by ) and if the overall input data is retained then this is enables later retrieving the span of bytes for the subterm.cborgThis captures the pattern of getting the byte offsets before and after decoding a subterm. ?!before <- peekByteOffset x <- decode !after <- peekByteOffsetcborg%Decode an indefinite sequence length.cborgDecode a sequence length.cborgcborgcborgcborgcborg"Expected value of the decoded wordcborg"Expected value of the decoded word !"#$%&'()*+,-./0123456789po:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnqrstuvwxyz{|}~q9po:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnrstuvwxyz{|}~ !"#$%&'()*+,-./012345678(c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred7cborg;An efficient, mutable counter. Designed to be used inside  or other primitive monads, hence it carries an abstract rank-2 s type parameter.cborg Grab a 8-bit  given a  to some address.cborgGrab a 16-bit  given a  to some address.cborgGrab a 32-bit  given a  to some address.cborgGrab a 64-bit  given a  to some address.cborgTake the tail of a  (i.e. drop the first byte) and read the resulting byte(s) as an 8-bit word value. The input  MUST be at least 2 bytes long: one byte to drop from the front, and one to read as a  value. This is not checked, and failure to ensure this will result in undefined behavior.cborgTake the tail of a  (i.e. drop the first byte) and read the resulting byte(s) as a 16-bit word value. The input  MUST be at least 3 bytes long: one byte to drop from the front, and two to read as a 16-bit  value. This is not checked, and failure to ensure this will result in undefined behavior.cborgTake the tail of a  (i.e. drop the first byte) and read the resulting byte(s) as a 32-bit word value. The input  MUST be at least 5 bytes long: one byte to drop from the front, and four to read as a 32-bit  value. This is not checked, and failure to ensure this will result in undefined behavior.cborgTake the tail of a  (i.e. drop the first byte) and read the resulting byte(s) as a 64-bit word value. The input  MUST be at least 9 bytes long: one byte to drop from the front, and eight to read as a 64-bit  value. This is not checked, and failure to ensure this will result in undefined behavior.cborgUnsafely take a  to a  and do unholy things with it.cborg Convert a  to a half-sized .cborgConvert a half-sized  to a .cborgCast a  to a .cborgCast a  to a .cborgCreate a negative  out of a raw .cborg Create an  out of a raw .cborg%Create a new counter with a starting  value.cborgRead the current value of a .cborgWrite a new value into the .cborg Increment a  by one.cborg Decrement a  by one.cborgCopy a  and create a primitive  from it.cborgCopy a ( at a certain offset and length into a .cborgCopy the data pointed to by a  into a @.cborgCopy a  into a  with a given offset and length.cborg to copy from.cborgOffset into the  to start with.cborgLength of the data to copy.cborg to buffer to copy from.cborg to copy into.cborgOffset to start copying from.cborgLength of the data to copy.cborg to copy.cborgOffset into the  of where to start copying.cborgPointer to destination buffer.cborg7Length of the data to copy into the destination buffer.""(c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred "6? cborgNote that canonicity information is calculated lazily. This way we don't need to concern ourselves with two distinct paths, while according to benchmarks it doesn't affect performance in the non-canonical case.cborgAn Incremental decoder, used to represent the result of attempting to run a decoder over a given input, and return a value of type a.cborgThe decoder has consumed the available input and needs more to continue. Provide ! if more input is available and # otherwise, and you will get a new .cborgThe decoder has successfully finished. Except for the output value you also get any unused input as well as the number of bytes consumed.cborg8The decoder ran into an error. The decoder either used  or was not provided enough input. Contains any unconsumed input, the number of bytes consumed, and a ; exception describing the reason why the failure occurred.cborgAn exception type that may be returned (by pure functions) or thrown (by IO actions) that fail to deserialise a given input.cborgGiven a q and some - representing an encoded CBOR value, return  the decoded CBOR value or an error. In addition to the decoded value return any remaining input content.cborgGiven a q and some - representing an encoded CBOR value, return  the decoded CBOR value or an error. In addition to the decoded value return any remaining input content and the number of bytes consumed.cborgRun a q incrementally, returning a continuation representing the result of the incremental decode.  (c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-InferredD cborgA concrete encoding of ) values, one which mirrors the original  type closely.cborgA "flat" representation of an 5 value, useful for round-tripping and writing tests.cborgConvert an arbitrary  into a .cborgA data type used for tracking the position we're at as we traverse a  and make sure it's valid.cborgGiven a q , decode a 2 back into an ordinary value, or return an error.cborgMap a  to the underlying CBOR cborg Ensure a = is internally consistent and was created in a valid manner.cborgValidate an arbitrary  at an arbitrary location.cborg Do a careful check to ensure an  is in the range of a .cborg The input .cborgThe resulting .cborgA q for a serialised value.cborgThe serialised .cborg$The deserialised value, or an error.cborg The input cborg if valid,  otherwise.(c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-InferredUQ$cborgA flattened representation of a term, which is independent of any underlying binary representation, but which we later serialise into CBOR format.cborgAn intermediate form used during serialisation, specified as a . It supports efficient concatenation, and is equivalent to a specialised   type.It is used for the stage in serialisation where we flatten out the Haskell data structure but it is independent of any specific external binary or text format.&Traditionally, to build any arbitrary  value, you specify larger structures from smaller ones and append the small ones together using .cborg Encode a  in a flattened format.cborg Encode a  in a flattened format.cborg Encode a  in a flattened format.cborg Encode a  in a flattened format.cborg Encode a  in a flattened format.cborg Encode an  in a flattened format.cborg Encode an  in a flattened format.cborg Encode an  in a flattened format.cborg Encode an  in a flattened format.cborg Encode an @ in a flattened format.cborgEncode an arbitrarily large @ in a flattened format.cborgEncode an arbitrary strict  in a flattened format.cborg*Encode a bytestring in a flattened format.cborgEncode a token specifying the beginning of a string of bytes of indefinite length. In reality, this specifies a stream of many occurrences of , each specifying a single chunk of the overall string. After all the bytes desired have been encoded, you should follow it with a break token (see ).cborg Encode a  in a flattened format.cborg-Encode the beginning of an indefinite string.cborgEncode a UTF-8 string in a flattened format. Note that the contents is not validated to be well-formed UTF-8.cborgEncode the length of a list, used to indicate that the following tokens represent the list values.cborgEncode a token specifying that this is the beginning of an indefinite list of unknown size. Tokens representing the list are expected afterwords, followed by a break token (see ) when the list has ended.cborgEncode the length of a Map, used to indicate that the following tokens represent the map values.cborgEncode a token specifying that this is the beginning of an indefinite map of unknown size. Tokens representing the map are expected afterwords, followed by a break token (see ) when the map has ended.cborgEncode a 'break', used to specify the end of indefinite length objects like maps or lists.cborgEncode an arbitrary  tag.cborgEncode an arbitrary 64-bit  tag.cborg Encode a .cborg Encode an Undef value.cborg Encode a Null value.cborgEncode a 'simple' CBOR token that can be represented with an 8-bit word. You probably don't ever need this.cborgEncode a small 16-bit  in a flattened format.cborgEncode a full precision  in a flattened format.cborg Encode a  in a flattened format.cborg-Include pre-encoded valid CBOR data into the .The data is included into the output as-is without any additional wrapper.(This should be used with care. The data must( be a valid CBOR encoding, but this is not checked.This is useful when you have CBOR data that you know is already valid, e.g. previously validated and stored on disk, and you wish to include it without having to decode and re-encode it.cborgcborg>>(c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-InferredYfcborgA general CBOR term, which can be used to serialise or deserialise arbitrary CBOR terms for interoperability or debugging. This type is essentially a direct reflection of the CBOR abstract syntax tree as a Haskell data type.The  type also comes with a  Serialise" instance, so you can easily use decode :: q  to directly decode any arbitrary CBOR value into Haskell with ease, and likewise with encode.cborgEncode an arbitrary  into an  for later serialization.cborg(Decode some arbitrary CBOR value into a .(c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-InferredZ] (c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred 8]RcborgTurn an  into a lazy  in CBOR binary format.cborgTurn an  into a strict  in CBOR binary format.cborgTurn an  into a   in CBOR binary format.cborgWrite the limbs of a 3 to the given address in big-endian byte ordering.cborgThe  of a CBOR value.cborgThe encoded CBOR value.cborgThe  of a CBOR value.cborgThe encoded value.cborgThe  of a CBOR value.cborgThe encoded value as a . (c) Duncan Coutts 2015-2017BSD3-style (see LICENSE.txt)duncan@community.haskell.org experimentalnon-portable (GHC extensions) Safe-Inferred58acborgPretty prints an  in an annotated, hexadecimal format that maps CBOR values to their types. The output format is similar to the format used on  http://cbor.me/.For example, with the term:  .  . " $ ( True , [1,2,3::Int] , ( [("Hello",True),("World",False)], "This is a long string which wraps") ) You get: 83 # list(3) f5 # bool(true) 9f # list(*) 01 # int(1) 02 # int(2) 03 # int(3) ff # break 82 # list(2) a2 # map(2) 65 48 65 6c 6c 6f # text("Hello") f5 # bool(true) 65 57 6f 72 6c 64 # text("World") f4 # bool(false) 78 21 54 68 69 73 20 69 73 20 61 20 6c 6f 6e 67 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 77 72 61 70 73 # text("This is a long string which wraps")   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~         $      $cborg-0.2.9.0-8oMySvfyt9vHzTwvKgguE8Codec.CBOR.ByteArray.SlicedCodec.CBOR.ByteArrayCodec.CBOR.DecodingCodec.CBOR.EncodingCodec.CBOR.FlatTermCodec.CBOR.MagicCodec.CBOR.ReadCodec.CBOR.TermCodec.CBOR.WriteCodec.CBOR.PrettyCodec.CBOR.ByteArray.InternalData.ByteString.Lazylength Data.MonoidEndomconcat Codec.CBORencodeData.MapfromListSlicedByteArraySBAunSBAoffsetfromShortByteStringfromByteString fromByteArraysizeofSlicedByteArray toByteString toBuilder$fOrdSlicedByteArray$fEqSlicedByteArray$fShowSlicedByteArray$fIsListSlicedByteArray$fIsStringSlicedByteArray ByteArrayBAunBAsizeofByteArraytoShortByteStringtoSliced$fIsListByteArray$fIsStringByteArray$fOrdByteArray $fEqByteArray$fShowByteArray ByteOffset TokenTypeTypeUInt TypeUInt64TypeNInt TypeNInt64 TypeInteger TypeFloat16 TypeFloat32 TypeFloat64 TypeBytesTypeBytesIndef TypeStringTypeStringIndef TypeListLen TypeListLen64TypeListLenIndef TypeMapLen TypeMapLen64TypeMapLenIndefTypeTag TypeTag64TypeBoolTypeNull TypeSimple TypeBreak TypeInvalid DecodeAction ConsumeWord ConsumeWord8 ConsumeWord16 ConsumeWord32ConsumeNegWord ConsumeInt ConsumeInt8 ConsumeInt16 ConsumeInt32ConsumeListLen ConsumeMapLen ConsumeTagConsumeInteger ConsumeFloat ConsumeDouble ConsumeBytesConsumeByteArray ConsumeStringConsumeUtf8ByteArray ConsumeBool ConsumeSimpleConsumeBytesIndefConsumeStringIndefConsumeListLenIndefConsumeMapLenIndef ConsumeNullConsumeListLenOrIndefConsumeMapLenOrIndefConsumeBreakOr PeekTokenType PeekAvailablePeekByteOffsetConsumeWordCanonicalConsumeWord8CanonicalConsumeWord16CanonicalConsumeWord32CanonicalConsumeNegWordCanonicalConsumeIntCanonicalConsumeInt8CanonicalConsumeInt16CanonicalConsumeInt32CanonicalConsumeListLenCanonicalConsumeMapLenCanonicalConsumeTagCanonicalConsumeIntegerCanonicalConsumeFloat16CanonicalConsumeFloatCanonicalConsumeDoubleCanonicalConsumeBytesCanonicalConsumeByteArrayCanonicalConsumeStringCanonicalConsumeUtf8ByteArrayCanonicalConsumeSimpleCanonicalFailDoneDecoderliftSTgetDecodeAction decodeWord decodeWord8 decodeWord16 decodeWord32 decodeWord64 decodeNegWorddecodeNegWord64 decodeInt decodeInt8 decodeInt16 decodeInt32 decodeInt64decodeWordCanonicaldecodeWord8CanonicaldecodeWord16CanonicaldecodeWord32CanonicaldecodeWord64CanonicaldecodeNegWordCanonicaldecodeNegWord64CanonicaldecodeIntCanonicaldecodeInt8CanonicaldecodeInt16CanonicaldecodeInt32CanonicaldecodeInt64Canonical decodeInteger decodeFloat decodeDouble decodeBytesdecodeBytesCanonicaldecodeBytesIndefdecodeByteArraydecodeByteArrayCanonical decodeStringdecodeStringCanonicaldecodeStringIndefdecodeUtf8ByteArraydecodeUtf8ByteArrayCanonical decodeListLendecodeListLenCanonicaldecodeListLenIndef decodeMapLendecodeMapLenCanonicaldecodeMapLenIndef decodeTag decodeTag64decodeTagCanonicaldecodeTag64Canonical decodeBool decodeNull decodeSimpledecodeIntegerCanonicaldecodeFloat16CanonicaldecodeFloatCanonicaldecodeDoubleCanonicaldecodeSimpleCanonical decodeWordOfdecodeListLenOfdecodeWordCanonicalOfdecodeListLenCanonicalOfdecodeListLenOrIndefdecodeMapLenOrIndef decodeBreakOr peekTokenType peekAvailablepeekByteOffsetdecodeWithByteSpandecodeSequenceLenIndefdecodeSequenceLenN$fMonadFailDecoder$fMonadDecoder$fApplicativeDecoder$fFunctorDecoder $fEqTokenType$fOrdTokenType$fEnumTokenType$fBoundedTokenType$fShowTokenTypeTokensEncoding TermTokenFlatTerm toFlatTermTkWordTkWord64TkIntTkInt64TkBytes TkBytesBegin TkByteArrayTkStringTkUtf8ByteArray TkStringBegin TkListLen TkListBeginTkMapLen TkMapBeginTkTagTkTag64 TkIntegerTkNullTkUndefTkBoolTkSimple TkFloat16 TkFloat32 TkFloat64TkBreak TkEncodedTkEnd encodeWord encodeWord8 encodeWord16 encodeWord32 encodeWord64 encodeInt encodeInt8 encodeInt16 encodeInt32 encodeInt64 encodeInteger encodeBytesencodeByteArrayencodeBytesIndef encodeStringencodeStringIndefencodeUtf8ByteArray encodeListLenencodeListLenIndef encodeMapLenencodeMapLenIndef encodeBreak encodeTag encodeTag64 encodeBool encodeUndef encodeNull encodeSimple encodeFloat16 encodeFloat encodeDoubleencodePreEncoded$fMonoidEncoding$fSemigroupEncoding$fShowEncoding $fShowTokens $fEqTokensCounter grabWord8 grabWord16 grabWord32 grabWord64 eatTailWord8 eatTailWord16 eatTailWord32 eatTailWord64 wordToFloat16 floatToWord16 wordToFloat32 wordToFloat64 intToInt64 intToWord intToWord64 int64ToWord64 word8ToWord word16ToWord word32ToWord word64ToWord word8ToInt word16ToInt word32ToInt word64ToIntnintegerFromBytesuintegerFromBytes newCounter readCounter writeCounter incCounter decCountercopyByteStringToByteArraycopyByteArrayToByteStringIDecodePartialDeserialiseFailuredeserialiseFromBytesdeserialiseFromBytesWithSizedeserialiseIncremental$fExceptionDeserialiseFailure$fNFDataDeserialiseFailure$fMonadIncrementalDecoder$fApplicativeIncrementalDecoder$fFunctorIncrementalDecoder$fShowLongToken$fShowDecodedToken$fEqDeserialiseFailure$fShowDeserialiseFailuredecodeTermToken fromFlatTerm validFlatTerm $fShowLoc $fEqTermToken$fOrdTermToken$fShowTermTokenTermTIntTIntegerTBytesTBytesITStringTStringITListTListITMapTMapITTaggedTBoolTNullTSimpleTHalfTFloatTDouble encodeTerm decodeTerm$fEqTerm $fOrdTerm $fShowTerm $fReadTermtoLazyByteStringtoStrictByteString prettyHexEnc $fMonadFailPP $fMonadPP$fApplicativePP $fFunctorPP mkByteArray.data-array-byte-0.1.0.1-B5cMzW9TZQ0HeLdy4luv5pData.Array.ByteisByteArrayPinnedfoldrByteArrayghc-prim GHC.TypesisTrue# copyToAddr sameByteArraytouchbaseGHC.IntInt64GHC.BaseMonadWordGHC.WordWord8Word16Word32Word64IntInt8Int16Int32 ghc-bignumGHC.Num.IntegerIntegerFloatDoublebytestring-0.11.3.1Data.ByteString.Internal ByteString text-1.2.5.0Data.Text.InternalText GHC.MaybeNothingJustTrueFalseGHC.STSTGHC.PtrPtr withBsPtrcopyPtrToMutableByteArrayMutableByteArraycopyByteArrayToPtr LongTokenControl.Monad.FailfailData.ByteString.Lazy.Internal Data.EitherEitherLoc tokenTypeOf validateTermintIsValidWord32MonoidBool Data.ByteString.Builder.InternalBuilderexportBigNatToAddrGHC.Num.BigNatBigNat System.IOputStrLn