# e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdNone !"(*34579;<>GIKLNVTakes pointers to the first byte in the buffer; the first byte after the buffer; a predicate to detect a field terminator; a failure action; and a continuation.The field terminator is used by variable length encodings where the length of the encoded data cannot be determined from the encoding itself.We try to unpack a value from the buffer. If unpacking succeeds then call the continuation with a pointer to the next byte after the unpacked value, and the value itself, otherwise call the failure action."Unpack data from the given buffer.PRECONDITION: The buffer must be at least the minimum size of the format (minSize). This allows us to avoid repeatedly checking for buffer overrun when unpacking fixed size format. If the buffer is not long enough then you'll get an indeterminate result (bad).Unpacker to run.Source buffer.Length of source buffer.Detect a field terminator.DUnpacked result, and pointer to the byte after the last one read.efgefgNone !"(*34579;<>GIKLNV3Packer wraps a function that can write to a buffer.:Takes start of buffer; failure action; and a continuation.We try to pack data into the given buffer. If packing succeeds then we call the continuation with a pointer to the next byte after the packed value, otherwise we call the failure action.  Pack data into the given buffer.yPRECONDITION: The buffer needs to be big enough to hold the packed data, otherwise you'll corrupt the heap (bad). Use  packedSize' to work out how big it needs to be. Packer to run.Start of buffer./Pointer to the byte after the last one written.h  hSafe !"(*34579;<>GIKLNV [Relates a storage format to the Haskell type of the value that is stored in that format. )Get the type of a value with this format. 3Yield the number of separate fields in this format. OYield the minumum number of bytes that a value of this format will take up. {Packing a value into this format is guaranteed to use at least this many bytes. This is exact for fixed-size formats.;For fixed size formats, yield their size (length) in bytes.Yields i$ if this is not a fixed size format.:Yield the maximum packed size of the value in this format.If  returns a size then  returns the same size.For variable length formats,  is an over-approximation. We allow the actual packed value to use less space, as it may not be possible to determine how much space it needs without actually packing it.Yields i when a collection of values is to be packed into a fixed length format, but the size of the collection does not match the format.    None !"(*34579;<>GIKLNV4Unpack a value from a buffer using the given format.2Low level unpacking function for the given format.\Class of storage formats that can have values packed and unpacked from foreign bufferes. The methods are written using continuations to make it easier for GHC to optimise its core code when packing/unpacking many fields.2Pack a value into a buffer using the given format.0Low level packing function for the given format.Storage format.Unpacker for that format. Data format.Start of buffer.*Pointer to first byte after end of buffer.Detect a field terminator.Signal failure.Accept an unpacked value.Storage format.Value to pack.!Packer that can write the value. Data format.Value to pack.Pointer to start of buffer.Signal failure.*Accept the address after the packed field.None !"(*34579;<>GIKLNV!Append fields without separators.jklmnojklmno None !"(*34579;<>GIKLNV !Big-endian 64-bit IEEE 754 float.!Big-endian 32-bit IEEE 754 float.!Big-endian 64-bit signed integer. Big-endian 64-bit unsigned word. !Big-endian 32-bit signed integer." Big-endian 32-bit unsigned word.& Big-endian 32-bit unsigned word.( Big-endian 8-bit signed integer.*Big-endian 8-bit unsigned word.pBitwise cast of q to r.The resulting r. contains the binary representation of the q-, rather than the integral part of its value.s Inverse of doubleToFloat32tBitwise cast of u to v.The resulting v. contains the binary representation of the u-, rather than the integral part of its value.w Inverse of t? !"#$%&'()*+xyz{|}~pstw  !"#$%&'()*+5 !"#$%&'()*+xyz{|}~pstw None !"(*34579;<>GIKLNV,4Variable length sequence of bytes, represented as a   .,-,-,- None !"(*34579;<>GIKLNVFormatting fields.None !"(*34579;<>GIKLNV.1Maybe a raw sequence of bytes, or something else.02Maybe a raw list of characters, or something else. ./01./01 ./01None !"(*34579;<>GIKLNV2Human-readable ASCII Double.{When packing we use a fixed number of zeros after the decimal point, though when unpacking we allow a greater precision.4Human-readable ASCII Double.6_Human-readable ASCII integer, using leading zeros to pad the encoding out to a fixed length.8Human-readable ASCII Integer.234567892345678923456789None !"(*34579;<>GIKLNV:/Human readable ASCII date in DDsMMsYYYY format.</Human readable ASCII date in YYYYsMMsDD format. :;<=:;<= :;<=None !"(*34579;<>GIKLNV*Precomputed information about this format.!Length of this format, in fields.(Minimum length of this format, in bytes.Fixed size of this format.$Separating charater for this format.A)Separate fields with the given character.*The separating character is un-escapable.  The format  (Sep ',')D does NOT parse a CSV file according to the CSV specification:  "http://tools.ietf.org/html/rfc4180.fThe type is kept abstract as we cache some pre-computed values we use to unpack this format. Use ? to make one.NBranchless equality used to avoid compile-time explosion in size of core code.>?@ABC >?@ABC>?@ABCNone !"(*34579;<>GIKLNVD&Match an exact sequence of characters.FhVariable length string in double quotes, and standard backslash encoding of non-printable characters.HLike J, but with a variable length.JFFixed length sequence of characters, represented as a (hated) Haskell .'The runtime performance of the Haskell I is atrocious. You really shouldn't be using them for large data sets.nWhen packing, the length of the provided string must match the width of the format, else packing will fail.IWhen unpacking, the length of the result will be the width of the format.*Unpack a ascii text from the given buffer.&Unpack a string from the given buffer.DEFGHIJKFirst byte in buffer.First byte after buffer.Detect field deliminator.First byte in buffer.First byte after buffer.Signal failure.Eat an unpacked value. DEFGHIJKDEFGHIJKNone !"(*34579;<>GIKLNVLQClass of types that can be formatted in some default human readable ASCII way.M#The format for values of this type.N*Get the standard ASCII format for a value.)The element value itself is not demanded."Dates are formatted as YYYY-MM-DD.ZStrings are formatted with double quotes and back-slash escaping of special characters.)Doubles are formatted as base-10 decimal.Ints are formated in base-10.Empty tuples produce no output. LMNLMN LMNNone !"(*34579;<>GIKLNV OA single field in an object.*Precomputed information about this format.!Length of this format, in fields.(Minimum length of this format, in bytes.Fixed size of this format.$Resents the fields of a JSON object.U5Format of a simple object format with labeled fields.VAMake an object format with the given labeled fields. For example: > let fmt = mkObject $ Field "index" IntAsc Nothing :*: Field "message" (VarCharString '-') Nothing :*: Field "value" (MaybeChars NULL+ DoubleAsc) (Just isJust) :*: () Packing this produces: r> let Just str = packToString fmt (27 :*: "foo" :*: Nothing :*: ()) > putStrLn str > {"index":27,"message":"foo"} Note that the encodings that this format can generate are a superset of the JavaScript Object Notation (JSON). With the Repa format, the fields of an object can directly encode dates and other values, wheras in JSON these values must be represented by strings.NBranchless equality used to avoid compile-time explosion in size of core code.OPQRSTUV OPQRSTUVOPQRSTUVNone !"(*34579;<>GIKLNVWhVariable length string in double quotes, and standard backslash encoding of non-printable characters.Y/Variable length unicode text, represented as a  Data.Text thing. WXYZ     WXYZ WXYZ     None !"(*34579;<>GIKLNV[A particular ASCII string.[\[\[\None !"(*34579;<>GIKLNVI !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ILMN[\01./JKHIFGDEYZWX,-89674523<=:;*+()&'$%"# !ABC>?@UTOPQRSVNone !"(*34579;<>GIKLNV   None !"(*34579;<>GIKLNV]8Constrain the type of a value to match the given format.The value itself is not used.^<Constrain the type of some values to match the given format.The value itself is not used._$Pack a value to a freshly allocated .`Unpack a value from a .aPack a value to a list of .bUnpack a value from a list of .c"Pack a value to a (hated) Haskell .d&Unpack a value from a (hated) Haskell .]^_`abcde  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd ]^_`abcd ]^_`abcd !"#$%&'()*+,, - - . . / / 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 78899::;;<<==>>??@ABCDEFFGGHHIIJKLMMNOPQRSTTUUVVWXYZ[\]^_`abcdefghijk lmnocpq r smntcpu v w x y z { | } ~   wcdwRw cprepac_GOv5PjsvXFGAKbAFTiFv3FData.Repa.Convert.FormatsData.Repa.Convert.FormatData.Repa.Convert#Data.Repa.Convert.Internal.Unpacker!Data.Repa.Convert.Internal.Packer!Data.Repa.Convert.Internal.Format#Data.Repa.Convert.Internal.PackableData.Repa.Convert.Format.AppData.Repa.Convert.Format.BinaryData.Repa.Convert.Format.BytesData ByteStringData.Repa.Convert.Format.FieldsData.Repa.Convert.Format.Maybe Data.Repa.Convert.Format.NumericData.Repa.Convert.Format.Date32Data.Repa.Convert.Format.SepData.Repa.Convert.Format.StringData.Repa.Convert.Format.AsciiData.Repa.Convert.Format.ObjectData.Repa.Convert.Format.TextData.Repa.Convert.Format.Unitrepas_3ih8WaLBKWQBOo3lIP6awTData.Repa.Scalar.Product:*:Unpacker fromUnpackerunsafeRunUnpackerPacker fromPackerunsafeRunPackerFormatValue fieldCountminSize fixedSize packedSize UnpackableunpackunpackerPackablepackpackerApp Float64be Float32beInt64beWord64beInt32beWord32beInt16beWord16beInt8beWord8beVarBytes MaybeBytes MaybeCharsDoubleFixedPack DoubleAscIntAsc0IntAsc DDsMMsYYYY YYYYsMMsDD SepFormatmkSep takeSepCharSepSepNilSepCons ExactChars VarCharStringVarCharsFixChars FormatAscii FormatAscii' formatAsciiField fieldName fieldFormat fieldInclude ObjectFormatObjectmkObject VarTextStringVarTextUnitAsc forFormat listFormatpackToByteStringunpackFromByteString packToList8unpackFromList8 packToStringunpackFromString$fMonadUnpacker$fApplicativeUnpacker$fFunctorUnpacker$fMonoidPackerbaseGHC.BaseNothing$fUnpackableApp $fPackableApp$fUnpackableApp0$fPackableApp0 $fFormatApp $fFormatApp0 floatToWord32ghc-prim GHC.TypesFloatGHC.WordWord32 word32ToFloatdoubleToWord64DoubleWord64word64ToDoublew8i8w16i16w32i32w64i64pw8$fUnpackableFloat64be$fPackableFloat64be$fFormatFloat64be$fUnpackableFloat32be$fPackableFloat32be$fFormatFloat32be$fUnpackableInt64be$fPackableInt64be$fFormatInt64be$fUnpackableWord64be$fPackableWord64be$fFormatWord64be$fUnpackableInt32be$fPackableInt32be$fFormatInt32be$fUnpackableWord32be$fPackableWord32be$fFormatWord32be$fUnpackableInt16be$fPackableInt16be$fFormatInt16be$fUnpackableWord16be$fPackableWord16be$fFormatWord16be$fUnpackableInt8be$fPackableInt8be$fFormatInt8be$fUnpackableWord8be$fPackableWord8be$fFormatWord8be$fUnpackableVarBytes$fPackableVarBytes$fFormatVarBytes $fFormat:*:$fUnpackable() $fPackable() $fFormat()minSize_MaybeBytesfixedSize_MaybeBytes$fUnpackableMaybeBytes$fPackableMaybeBytes$fFormatMaybeBytes$fUnpackableMaybeChars$fPackableMaybeChars$fFormatMaybeChars$fUnpackableDoubleFixedPack$fPackableDoubleFixedPack$fFormatDoubleFixedPack$fUnpackableDoubleAsc$fPackableDoubleAsc$fFormatDoubleAsc$fUnpackableIntAsc0$fPackableIntAsc0$fFormatIntAsc0$fUnpackableIntAsc$fPackableIntAsc$fFormatIntAsccw8$fUnpackableDDsMMsYYYY$fPackableDDsMMsYYYY$fFormatDDsMMsYYYY$fUnpackableYYYYsMMsDD$fPackableYYYYsMMsDD$fFormatYYYYsMMsDDSepMeta smFieldCount smMinSize smFixedSize smSepChar zeroOrOne$fUnpackableSep $fPackableSep$fUnpackableSep0$fPackableSep0 $fFormatSep$fUnpackableSep1$fPackableSep1 $fFormatSep0$fSepFormat:*: $fSepFormat()StringunpackCharList unpackString$fUnpackableExactChars$fPackableExactChars$fFormatExactChars$fUnpackableVarCharString$fPackableVarCharString$fFormatVarCharString$fUnpackableVarChars$fPackableVarChars$fFormatVarChars$fUnpackableFixChars$fPackableFixChars$fFormatFixChars$fFormatAsciiDate32$fFormatAscii[]$fFormatAsciiDouble$fFormatAsciiInt$fFormatAscii()Plain$fFormatAsciiPlain$fFormatAsciiPlain0 ObjectMeta omFieldCount omMinSize omFixedSize ObjectFields ObjectFormat'mkObjectFieldsObjectFieldsNilObjectFieldsCons$fPackableObjectFields$fPackableObjectFields0$fPackableObject$fFormatObjectFields$fUnpackableObjectFields$fPackableObjectFields1$fFormatObjectFields0$fFormatObject$fObjectFormat:*:$fObjectFormat()$fUnpackableVarTextString$fPackableVarTextString$fFormatVarTextString$fUnpackableVarText$fPackableVarText$fFormatVarText$fUnpackableUnitAsc$fPackableUnitAsc$fFormatUnitAscbytes_6VWy06pWzJq9evDvK2d4w6Data.ByteString.InternalWord8