!nq      !"#$%&'()*+,-./0123456789:;< = > ? @ABCDE F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o pq r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!Safe=? flat"Convert to/from strict ByteStrings   Trustworthy>X!flatReinterpret-casts a  to a .'\f -> wordToFloat (floatToWord f ) == ffloatToWord (-0.15625) 3189768192wordToFloat 3189768192-0.15625%floatToWord (-5.828125) == 0xC0BA8000TrueflatReinterpret-casts a  to a .flatReinterpret-casts a  to a .)\f -> wordToDouble (doubleToWord f ) == f,showHex (doubleToWord 1.0000000000000004) """3ff0000000000002"5doubleToWord 1.0000000000000004 == 0x3FF0000000000002True$showHex (doubleToWord (-0.15625)) """bfc4000000000000"wordToDouble 0xbfc4000000000000-0.15625flatReinterpret-casts a  to a .flatIrunST (cast (0xF0F1F2F3F4F5F6F7::Word64)) == (0xF0F1F2F3F4F5F6F7::Word64)TrueSafe8@ACX3 flatConvert between a signed integral and the corresponding ZigZag encoded unsigned integral (e.g. between Int8 and Word8 or Integral and Natural).)Invalid conversions produce a type error:AzigZag (-1::Int64) :: Word32 ... ... Couldn't match type ... ...zigZag (0::Int8)0zigZag (-1::Int16)1zigZag (1::Int32)2zigZag (-2::Int16)3zigZag (-50::Integer)99zigZag (50::Integer)100zigZag (64::Integer)128zigZag (-256::Integer)511zigZag (256::Integer)512map zigZag [-3..3::Integer][5,3,1,0,2,4,6]map zagZig [0..6::Word8][0,-1,1,-2,2,-3,3]'\(f::Integer) -> zagZig (zigZag f) == f'\(f::Natural) -> zigZag (zagZig f) == f$\(f::Int8) -> zagZig (zigZag f) == f%\(f::Word8) -> zigZag (zagZig f) == fK\(s::Int8) -> zigZag s == fromIntegral (zigZag (fromIntegral s :: Integer))L\(u::Word8) -> zagZig u == fromIntegral (zagZig (fromIntegral u :: Natural))%\(f::Int64) -> zagZig (zigZag f) == f&\(f::Word64) -> zigZag (zagZig f) == fL\(s::Int64) -> zigZag s == fromIntegral (zigZag (fromIntegral s :: Integer))M\(u::Word64) -> zagZig u == fromIntegral (zagZig (fromIntegral u :: Natural))None45flatAn exception during decoding flatA decoded value#flat Decoder state'flat Decoder monad !"#$%&'()*+,-*'()#$%&!" +,- Safe<0=flat5Convert a 64 bit value in cpu endianess to big endian[toBE64 0xF0F1F2F3F4F5F6F7 == if isBigEndian then 0xF0F1F2F3F4F5F6F7 else 0xF7F6F5F4F3F2F1F0True>flat5Convert a 32 bit value in cpu endianess to big endianCtoBE32 0xF0F1F2F3 == if isBigEndian then 0xF0F1F2F3 else 0xF3F2F1F0True?flat5Convert a 16 bit value in cpu endianess to big endian7toBE16 0xF0F1 == if isBigEndian then 0xF0F1 else 0xF1F0True<=>?>=?<NoneFHV@fAflat5Copy bytestring to given pointer, returns new pointerflatWrapper around copyByteArrayToAddr#, primop. Copied from the store-core packageflatWrapper around copyAddrToByteArray#, primop. Copied from the store-core package@ABCDCDBA@ NoneXZQEflat4A special state, optimised for constructor decoding.It consists of:rThe bits to parse, the top bit being the first to parse (could use a Word16 instead, no difference in performance)The number of decoded bits)Supports up to 512 constructors (9 bits).Gflat"Switch to constructor decoding {- INLINE consOpen -}Hflat"Switch back to normal decoding {- NOINLINE consClose -}IflatDecode a single bitJflatDecode from 1 to 3 bitsgIt could read more bits that are available, but it doesn't matter, errors will be checked in consClose.flat5Ensure that the specified number of bits is availableKflat!Drop the specified number of bitsLflatDecode a booleanMflat7Return the n most significant bits (up to maximum of 8)$The bits are returned right shifted:?unflatWith (dBEBits8 3) [0b11100001::Word8] == Right 0b00000111TrueNflat^Return the n most significant bits (up to maximum of 16) The bits are returned right shifted.Oflat]Return the n most significant bits (up to maximum of 8) The bits are returned right shifted.Pflat]Return the n most significant bits (up to maximum of 8) The bits are returned right shifted.Qflat1Return the 8 most significant bits (same as dBE8)Rflat"Return the 8 most significant bitsSflat#Return the 16 most significant bitsTflat#Return the 32 most significant bitsUflat#Return the 64 most significant bitsVflatDecode a FloatWflatDecode a DoubleXflatDecode a Lazy ByteStringYflatDecode a ByteStringZflat!Decode a ByteArray and its length[flat~Decode an Array (a list of chunks up to 255 bytes long) returning the pointer to the first data byte and a list of chunk sizesEFGHIJKLMNOPQRSTUVWXYZ[LQRSTUMNOPKVW[YXZEFGHIJ NoneQ\]^_`abcdefghijklmno]\olmnjk_^iQfgh`bcdeaNone\5. '*EFGHIJKLMNOPQRSTUVW\]^_`abcdefghijklmno.* 'olmnjk]\VW_^iLQfgh`bcdeaRSTUMNOPKEFGHIJSafe]None=?^spflatNumber of bitspp None`qflatA basic encoderrflatStrict encoder statewflat7Calculate the size (in bits) of the encoding of a valuepqrsvtuwwpqrsvtu NoneFPX`hmflat<Encoded as: data NonEmptyList = Elem Word7 | Cons Word7 ListflatEncode text as UTF8 and encode the result as an array of bytes PROB: encodeUtf8 calls a C primitive, not compatible with GHCJS (fixed in latest versions of GHCJS?)flat{Encode text as UTF16 and encode the result as an array of bytes Efficient, as Text is already internally encoded as UTF16.flatEncode a Lazy ByteStringflatEncode up to 9 bitsflatEncode up to 8 bits. yz{|}~ yz}~|{Nonei NoneXl flatStrict encoderflatEncode as a ListflatEncode as Array99Nonen<pw<pw Trustworthy.8=>?@AHUVXflat Calculate number of constructorsflatCalculate size in bits of constructor vs proxy implementation: similar compilation time but much better run times (at least for Tree N, -70%)flatCalculate the number of bits required for the serialisation of a value Implemented as a function that adds the maximum size to a running totalflatConstructor DecoderflatGeneric DecodingflatGeneric Encoderflat*Class of types that can be encoded/decodedflat/Return the encoding corrresponding to the valueflatDecode a valueflat8Add maximum size in bits of the value to the total count7Used to calculated maximum buffer size before encoding flatDCalculate the maximum size in bits of the serialisation of the valueflat$Product: constructor with parametersflatConstructor without argumentsflatType without constructorsflat Metadata (constructor name, etc) flatConstructor without arguments flatType without constructors flat Skip metadataflat Skip metadataflat6Constants, additional parameters, and rank-1 recursionflat]Data types with up to 512 constructors Uses a custom constructor decoding state instance {- OVERLAPPABLE I-} (GDecodeSum (a :+: b),GDecode a, GDecode b) => GDecode (a :+: b) whereh      !"#$%&'()*+,-None%PX      !"#$%&'()*+,- '*EFGHIJKLMNOPQRSTUVW\]^_`abcdefghijklmnopwNoneflattst (UTF16Text $ T.pack "aaa") (True,72,[1,6,97,0,97,0,97,0,0])tst (UTF16Text $ T.pack "HHH"):(True,120,[1,12,0,216,72,223,0,216,72,223,0,216,72,223,0])<A wrapper to encode/decode Text as UTF16 (faster but bigger)flat`The desired text encoding can be explicitly specified using the wrappers UTF8Text and UTF16Text.The default encoding is UTF8:3tst (UTF8Text $ T.pack "eee") == tst (T.pack "eee")TrueAA wrapper to encode/decode Text as UTF8 (slower but more compact)flatiText (and Data.Text.Lazy) is encoded as a byte aligned array of bytes corresponding to its UTF8 encoding.tst $ T.pack ""(True,16,[1,0])tst $ T.pack "aaa"(True,120,[1,3,97,97,97,0])tst $ T.pack ""*(True,120,[1,6,194,162,194,162,194,162,0])tst $ T.pack "eee"6(True,120,[1,9,230,151,165,230,151,165,230,151,165,0])tst $ T.pack "HHH"C(True,120,[1,12,240,144,141,136,240,144,141,136,240,144,141,136,0])+Strict and Lazy Text has the same encoding:)tst (T.pack "abc") == tst (TL.pack "abc")TrueNone=>?'flat.Maps are saved as lists of (key,value) tuples.2tst (AsMap (Data.Map.fromList ([]::[(Word8,())]))) (True,1,[0])3tst (AsMap (Data.Map.fromList [(3::Word,9::Word)]))(True,18,[129,132,128])0flat Sequences are defined as Arrays:iArray v = A0 | A1 v (Array v) | A2 v v (Array v) ... | A255 ... (Array v)In practice, this means that the sequence is encoded as a sequence of blocks of up to 255 elements, with every block preceded by the count of the elements in the block and a final 0-length block.Lists are defined as:'List a "a Nil | Cons a (List a)QThe AsList/AsArray wrappers can be used to serialise sequences as Lists or Arraystst $ AsArray ([]::[()]) (True,8,[0])tst $ AsArray [11::Word8,22,33](True,40,[3,11,22,33,0])tst $ AsList ([]::[()]) (True,1,[0])tst (AsList [11::Word8,22,33])(True,28,[133,197,164,32])1tst (AsSet (Data.Set.fromList [11::Word8,22,33]))(True,28,[133,197,164,32])3flatCalculate size of an instance of IsSequence as the sum: * of the size of all the elements * plus the size of the array constructors (1 byte every 255 elements plus one final byte)4flat-Encode an instance of IsSequence, as an array5flat-Decode an instance of IsSequence, as an array=flat<Encode an instance of IsMap, as a list of (Key,Value) tuples>flat<Decode an instance of IsMap, as a list of (Key,Value) tuples'()*+,-./0123456789:;<=>3456789:;<=>012-./*+,'()NoneQflatVectors are encoded as arrays."tst (V.fromList [11::Word8,22,33])(True,40,[3,11,22,33,0])(All Vectors are encoded in the same way:`let l = [11::Word8,22,33] in all (tst (V.fromList l) ==) [tst (U.fromList l),tst (S.fromList l)]TrueNoneRflat3test (Data.HashMap.Strict.fromList [(1,11),(2,22)])3(True,35,"10000001 00001011 01000001 00001011 000")1test (Data.HashMap.Lazy.fromList [(1,11),(2,22)])3(True,35,"10000001 00001011 01000001 00001011 000")Sflat)test (Data.HashSet.fromList [1..3::Word])+(True,28,"10000000 11000000 10100000 0110")None17=?Yflat&Tuples are supported up to 7 elements.test (False,()) (True,1,"0") test ((),()) (True,0,"")L"7 elements tuples ought to be enough for anybody" (Bill Gates - apocryphal)+test (False,True,True,True,False,True,True)(True,7,"0111011")1tst (1::Int,"2","3","4","5","6","7","8") ...errorZflattest (B.fromList [True]) (True,2,"10")test (B.fromList [False,False])(True,4,"0100")[flatsFor better encoding/decoding performance, it is useful to declare instances of concrete list types, such as [Char].test "" (True,1,"0") test "aaa"+(True,28,"10110000 11011000 01101100 0010")\flattest ([]::[Bool]) (True,1,"0")test [False,False](True,5,"10100")]flat7Ratios are encoded as tuples of (numerator,denominator)test (3%4::Ratio Word8)(True,16,"00000011 00000100")^flattest (4 :+ 2 :: Complex Word8)(True,16,"00000100 00000010")_flat5Doubles are encoded as standard IEEE binary64 values: IEEE_754_binary64 "a IEEE_754_binary64 {sign :: Sign, exponent :: MostSignificantFirst Bits11, fraction :: MostSignificantFirst Bits52} `flat4Floats are encoded as standard IEEE binary32 values: IEEE_754_binary32 "a IEEE_754_binary32 {sign :: Sign, exponent :: MostSignificantFirst Bits8, fraction :: MostSignificantFirst Bits23} test (0::Float)/(True,32,"00000000 00000000 00000000 00000000")test (1.4012984643E-45::Float)/(True,32,"00000000 00000000 00000000 00000001")test (1.1754942107E-38::Float)/(True,32,"00000000 01111111 11111111 11111111")aflattest (0::Int64)(True,8,"00000000")test (minBound::Int64)e(True,80,"11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000001")test (maxBound::Int64)e(True,80,"11111110 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000001")bflattest (0::Int32)(True,8,"00000000")test (minBound::Int32)8(True,40,"11111111 11111111 11111111 11111111 00001111")test (maxBound::Int32)8(True,40,"11111110 11111111 11111111 11111111 00001111")cflattest (0::Int16)(True,8,"00000000")test (1::Int16)(True,8,"00000010")test (-1::Int16)(True,8,"00000001")test (minBound::Int16)&(True,24,"11111111 11111111 00000011") equivalent to 0b1111111111111111test (maxBound::Int16)&(True,24,"11111110 11111111 00000011") equivalent to 0b1111111111111110dflattest (0::Int8)(True,8,"00000000")test (127::Int8)(True,8,"11111110")test (-128::Int8)(True,8,"11111111")eflat2Integers are encoded just as the fixed size Ints. test (0::Integer)(True,8,"00000000")test (-1::Integer)(True,8,"00000001")test (1::Integer)(True,8,"00000010")test (-(2^4)::Integer)(True,8,"00011111")test (2^4::Integer)(True,8,"00100000")test (-(2^120)::Integer)(True,144,"11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011")test (2^120::Integer)(True,144,"10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 00000100")fflat8Integer, Int, Int16, Int32 and Int64 are defined as the  Lhttps://developers.google.com/protocol-buffers/docs/encoding#signed-integersZigZag1 encoded version of the equivalent unsigned Word: Int "a Int (ZigZag Word) Int64 "a Int64 (ZigZag Word64) Int32 "a Int32 (ZigZag Word32) Int16 "a Int16 (ZigZag Word16) Int8 "a Int8 (ZigZag Word8) ZigZag a "a ZigZag a ZigZag encoding alternates between positive and negative numbers, so that numbers whose absolute value is small can be encoded efficiently: test (0::Int)(True,8,"00000000")test (-1::Int)(True,8,"00000001") test (1::Int)(True,8,"00000010")test (-2::Int)(True,8,"00000011") test (2::Int)(True,8,"00000100")jflat3Naturals are encoded just as the fixed size Words. test (0::Natural)(True,8,"00000000")test (2^120::Natural)(True,144,"10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 00000010")kflatNatural, Word, Word16, Word32 and Word64 are encoded as a non empty list of 7 bits chunks (least significant chunk first and most significant bit first in every chunk).Words are always encoded in a whole number of bytes, as every chunk is 8 bits long (1 bit for the List constructor, plus 7 bits for the value).The actual definition is: Word64 "a Word64 Word Word32 "a Word32 Word Word16 "a Word16 Word Word "a Word (LeastSignificantFirst (NonEmptyList (MostSignificantFirst Word7))) LeastSignificantFirst a "a LeastSignificantFirst a NonEmptyList a "a Elem a | Cons a (NonEmptyList a) MostSignificantFirst a "a MostSignificantFirst a Word7 "a V0 | V1 | V2 ... | V127 2Values between as 0 and 127 fit in a single byte. N127 (0b1111111) is represented as Elem V127 and encoded as: Elem=0 127=1111111test (127::Word)(True,8,"01111111")}254 (0b11111110) is represented as Cons V126 (Elem V1) (254=128+126) and encoded as: Cons=1 V126=1111110 (Elem=0 V1=0000001):test (254::Word)(True,16,"11111110 00000001")FAnother example, 32768 (Ob1000000000000000 = 0000010 0000000 0000000):test (32768::Word32)&(True,24,"10000000 10000000 00000010")_As this is a variable length encoding, values are encoded in the same way, whatever their type:Lall (test (3::Word) ==) [test (3::Word16),test (3::Word32),test (3::Word64)]TruelflatWord8 always take 8 bits.test (0::Word8)(True,8,"00000000")test (255::Word8)(True,8,"11111111")mflattest (MkFixed 123 :: Fixed E0)(True,16,"11110110 00000001")@test (MkFixed 123 :: Fixed E0) == test (MkFixed 123 :: Fixed E2)Truenflat!test (Left False::Either Bool ()) (True,2,"00")test (Right ()::Either Bool ()) (True,1,"1")oflattest (Nothing::Maybe Bool) (True,1,"0")test (Just False::Maybe Bool) (True,2,"10")pflat-Char's are mapped to Word32 and then encoded.6For ascii characters, the encoding is standard ascii. test 'a'(True,8,"01100001")5For unicode characters, the encoding is non standard.test ''(True,16,"11001000 00000001")test 'N '&(True,24,"10001101 10011100 00000001")test "\x1F600")(True,26,"11000000 01110110 00000011 10")qflatOne bit is plenty for a Bool. test False (True,1,"0") test True (True,1,"1")rflatN`()`, as all data types with a single constructor, has a zero-length encoding.test () (True,0,"")None 17=>SX,1sflat5tst (Node (1::Word8) [Node 2 [Node 3 []], Node 4 []])(True,39,[1,129,64,200,32])tflatData.Set is encoded as a list'asList Data.Set.fromList [3::Word8,4,7]Trueuflat&Data.Sequence.Seq is encoded as a list,asList Data.Sequence.fromList [3::Word8,4,7]TruevflatMaps are encoded as lists:!tst (Data.Map.empty :: Map () ()) (True,1,[0])0asList Data.Map.fromList [("a","aa"),("b","bb")]True Key/Values are encoded in order:klet l = [("a","aa"),("b","bb")] in tst (Data.Map.fromList l) == tst (Data.Map.fromList $ Prelude.reverse l)True+IntMap and Map are encoded in the same way:[let l = [(2::Int,"b"),(1,"a")] in tst (Data.IntMap.fromList l) == tst (Data.Map.fromList l)Truewflat1Maps are defined as a list of (Key,Value) tuples: 7Map = List (Key,Value) List a = Nil | Cons a (List a) $tst (Data.IntMap.empty :: IntMap ()) (True,1,[0])-asList Data.IntMap.fromList [(1,"a"),(2,"b")]True<=><=>None.xflat&test (Data.DList.fromList [7::Word,7])!(True,19,"10000011 11000001 110")=let l = [7::Word,7] in flat (Data.DList.fromList l) == flat lTrueNone@}yflat,tst ((False,True,False,SBS.pack [11,22,33]))(True,51,[65,3,11,22,33,0])zflat*tst ((False,True,False,L.pack [11,22,33]))(True,51,[65,3,11,22,33,0]){flatVByteString, ByteString.Lazy and ByteString.Short are all encoded as Prealigned Arrays: PreAligned a "a PreAligned {preFiller :: Filler, preValue :: a} Filler "a FillerBit Filler | FillerEnd Array v = A0 | A1 v (Array v) | A2 v v (Array v) ... | A255 ... (Array v) That's to say as a byte-aligned sequence of blocks of up to 255 elements, with every block preceded by the count of the elements in the block and a final 0-length block.tst (B.pack [11,22,33])(True,48,[1,3,11,22,33,0])where:C1= PreAlignment (takes a byte if we are already on a byte boundary) 3= Number of bytes in ByteString11,22,33= Bytes0= End of Arraytst (B.pack [])(True,16,[1,0])IPre-alignment ensures that a ByteString always starts at a byte boundary:*tst ((False,True,False,B.pack [11,22,33]))(True,51,[65,3,11,22,33,0]),All ByteStrings are encoded in the same way:Ball (tst (B.pack [55]) ==) [tst (L.pack [55]),tst (SBS.pack [55])]TrueNone=>?L}flat?Array is encoded as (lowBound,highBound,AsArray (elems array)):let arr = A.array ((1::Word,4::Word),(2,5)) [((1,4),11::Word),((1,5),22),((2,4),33),((2,5),44)] in tst (bounds arr,AsArray(elems arr)) == tst arrTrueAs it's easy to see:[tst $ A.array ((1::Word,4::Word),(2,5)) [((1,4),11::Word),((1,5),22),((2,4),33),((2,5),44)]#(True,80,[1,4,2,5,4,11,22,33,44,0])Utst $ A.array ((1,4),(2,5)) [((1,4),"1.4"),((1,5),"1.5"),((2,4),"2.4"),((2,5),"2.5")]P(True,160,[2,8,4,10,4,152,203,166,137,140,186,106,153,75,166,137,148,186,106,0])6Arrays and Unboxed Arrays are encoded in the same way:let bounds = ((1::Word,4::Word),(2,5));elems=[11::Word,22,33,44] in tst (U.listArray bounds elems :: U.UArray (Word,Word) Word) == tst (A.listArray bounds elems)True NoneL'()*+,-./0123456789:;<=>None79XWA~flatA Pre aligned value, a value preceded by a filler Useful to prealign ByteArrays, Texts and any structure that can be encoded more efficiently when byte aligned. flathA Post aligned value, a value followed by a filler Useful to complete the encoding of a top-level valueflatA meaningless sequence of 0 bits terminated with a 1 bit (easier to implement than the reverse) Useful to align an encoded value at byte/word boundaries.flatLength of a filler in bitsflatPost align a valueflatPre align a valueflat+Decode a value assuming that is PostAlignedflat%Use a special encoding for the filler~~None=>?@A[flatEncode padded value.flatDecode padded value.flat9Decode padded value, using the provided unpadded decoder.flatDecode unpadded value.flat-Unflat unpadded value, using provided decoderflatEncode unpadded valueNone=?SXgflatA sequence of bitsflatlThe sequence of bits corresponding to the serialization of the passed value (without any final byte padding) bits True[True]flatWThe sequence of bits corresponding to the byte-padded serialization of the passed valuepaddedBits True/[True,False,False,False,False,False,False,True]flat>Convert an integral value to its equivalent bit representationasBits (5::Word8)/[False,False,False,False,False,True,False,True]flat=Convert a sequence of bits to the corresponding list of bytes asBytes $ asBits (256+3::Word16)[1,3].flat?Convert to the corresponding value (most significant bit first)/flat,Split a list in groups of 8 elements or lessflat#prettyShow $ asBits (256+3::Word16)"00000001 00000011"NonekSflatIReturns: result of flat/unflat test, encoding size in bits, byte encodingflatIReturns: result of flat/unflat test, encoding size in bits, bits encodingflat+Test that container is serialised as a List!Nonek      !"#$%&'()*+,- '()*+,-./0123456789:;<=>~ 0"#$"#%"&'"()"*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPPQQRSTTUVWXYZ[\]^_`abcdefg h i j klmnop q q r s t u v w x y z { | } ~    Q Q S  a !      !"#$%&&'(()*+,-./0123445667889::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"" """"""""" """""""""""""""""""""""""""""""""""""""""""""""""Q""""""""" " " " " """""""" " " """"""""""""""" "!"""#"$"%"&"'"(")"*"+",-./flat-0.4-HWYI7efCyMJ7TrB15FkFpR Flat.Encoder Flat.Types Flat.MemoryData.FloatCastFlat.Instances.TestData.ByteString.Convert Data.ZigZagFlat.Decoder.Types Flat.EndianFlat.Decoder.PrimFlat.Decoder.StrictFlat.Encoder.TypesFlat.Encoder.PrimFlat.Encoder.SizeFlat.Encoder.Strict Flat.ClassFlat.Instances.UtilFlat.Instances.TextFlat.Instances.MonoFlat.Instances.VectorFlat.Instances.UnorderedFlat.Instances.BaseFlat.Instances.ContainersFlat.Instances.DListFlat.Instances.ByteStringFlat.Instances.Array Flat.FillerFlat.Run Flat.Bits Flat.Decoder Flat.TutorialFlat.InstancesFlatbaseGHC.Base<>mempty GHC.NaturalNaturalGHC.PtrminusPtrGHC.STrunSTbytestring-0.10.8.2Data.ByteString.Short.InternalShortByteStringpretty-1.1.3.6Text.PrettyPrint.HughesPJClass prettyShow'primitive-0.7.0.1-4OYEE8uw8FE1Ko7THF1ebData.Primitive.ByteArray ByteArray text-1.2.3.1Data.Text.InternalText AsByteString toByteStringfromByteString$fAsByteString[]$fAsByteStringByteString$fAsByteStringByteString0 wordToFloat floatToWord doubleToWord wordToDoublecastZigZagzigZagzagZig$fZigZagIntegerNatural$fZigZagInt64Word64$fZigZagInt32Word32$fZigZagInt16Word16$fZigZagInt8Word8DecodeExceptionNotEnoughSpace TooMuchSpace BadEncodingDecoded GetResultScurrPtrusedBitsGetrunGet strictDecodernotEnoughSpace tooMuchSpace badEncoding$fMonadFailGet $fMonadGet$fApplicativeGet $fShowGet $fNFDataGet $fFunctorGet$fExceptionDecodeException$fShowS$fEqS$fOrdS$fFunctorGetResult$fShowDecodeException$fEqDecodeException$fOrdDecodeException isBigEndiantoBE64toBE32toBE16unsafeCreateUptoN'pokeByteString pokeByteArraychunksToByteStringchunksToByteArray ConsStateconsOpen consCloseconsBoolconsBitsdropBitsdBooldBEBits8 dBEBits16 dBEBits32 dBEBits64dWord8dBE8dBE16dBE32dBE64dFloatdDoubledLazyByteString_ dByteString_ dByteArray_ getChunksInfodecodeListWithdecodeArrayWithdNaturaldIntegerdWorddIntdInt8dInt16dInt32dInt64dWord16dWord32dWord64dChardUTF16dUTF8dLazyByteStringdShortByteStringdShortByteString_ dByteStringNumBitsPrimnextPtrcurrByteSizeeFloatFeDoubleF eWord64BEF eWord32BEFeCharFeWordFeIntFeInt8FeInt16FeInt32FeInt64F eIntegerF eNaturalFw7leWord8FeWord32EeWord64EeWord16FeWord32FeWord64FvarWordFeUTF8FeUTF16F eLazyBytesF eShortBytesFeBytesFeBits16FeBitsFeBoolFeTrueFeFalseFeFillerF sFillerMaxsBoolsWord8sInt8sFloatsDoublesCharsCharMaxsWordsIntsInt16sInt32sInt64sWord16sWord32sWord64sIntegersNatural sIntegralsUTF8MaxsUTF16sBytes sLazyBytes sShortBytes textBytes bitsToBytesnumBlks arrayBits arrayChunksblobBits blkBitsBSblksBitsEncodingrun strictEncoder encodersSencodeListWithencodeArrayWitheChareUTF16eUTF8eBytes eLazyBytes eShortByteseNaturaleFloateDoubleeIntegereInt64eInt32eInt16eInt8eInteWord64eWord32eWord16eWord8eWordeBits16eBitseFillereBooleTrueeFalsevsizecsize$fMonoidEncoding$fSemigroupEncoding$fShowEncodingencodedecodesizegetSize $fGEncode:*: $fGEncodeU1 $fGEncodeV1 $fGEncodeM1 $fGEncodeM10$fGEncodeSumM1$fGEncodeSum:+: $fGDecode:+: $fGDecode:*: $fGDecodeU1 $fGDecodeV1 $fGDecodeM1$fGDecodeSumM1$fGDecodeSum:+:$fGDecodeSum:+:0$fGDecodeSum:+:1 $fGSize:*: $fGSizeU1 $fGSizeV1 $fGSizeM1 $fGSizeK1 $fGDecodeK1 $fGEncodeK1 $fGSizeSumM1 $fGSizeSum:+: $fGSize:+: $fGDecode:+:0 $fGEncode:+: encodeArray UTF16TextunUTF16UTF8TextunUTF8 $fFlatText $fFlatText0$fFlatUTF8Text$fFlatUTF16Text $fEqUTF8Text $fOrdUTF8Text$fShowUTF8Text $fEqUTF16Text$fOrdUTF16Text$fShowUTF16TextAsMapunMapAsSetunSetAsListunListAsArrayunArray sizeSequenceencodeSequencedecodeSequencesizeList encodeList decodeListsizeSet encodeSet decodeSetsizeMap encodeMap decodeMap $fFlatAsArray $fFlatAsList $fFlatAsSet $fFlatAsMap $fShowAsArray $fEqAsArray $fOrdAsArray $fShowAsList $fEqAsList $fOrdAsList $fShowAsSet $fEqAsSet $fOrdAsSet $fShowAsMap $fEqAsMap $fOrdAsMap $fFlatVector $fFlatVector0 $fFlatVector1 $fFlatHashMap $fFlatHashSet$fFlat(,,,,,,) $fFlat(,,,,,) $fFlat(,,,,) $fFlat(,,,) $fFlat(,,) $fFlat(,)$fFlatNonEmpty$fFlat[] $fFlat[]0 $fFlatRatio $fFlatComplex $fFlatDouble $fFlatFloat $fFlatInt64 $fFlatInt32 $fFlatInt16 $fFlatInt8 $fFlatInteger $fFlatInt $fFlatWord64 $fFlatWord32 $fFlatWord16 $fFlatNatural $fFlatWord $fFlatWord8 $fFlatFixed $fFlatEither $fFlatMaybe $fFlatChar $fFlatBool$fFlat() $fFlatTree $fFlatSet $fFlatSeq $fFlatMap $fFlatIntMap $fFlatDList$fFlatShortByteString$fFlatByteString$fFlatByteString0 $fFlatUArray $fFlatArray PreAligned preFillerpreValue PostAligned postValue postFillerFiller FillerBit FillerEnd fillerLength postAligned preAlignedpostAlignedDecoder $fFlatFiller $fShowFiller $fEqFiller $fOrdFiller$fGenericFiller$fNFDataFiller$fShowPostAligned$fEqPostAligned$fOrdPostAligned$fGenericPostAligned$fNFDataPostAligned$fFlatPostAligned$fShowPreAligned$fEqPreAligned$fOrdPreAligned$fGenericPreAligned$fNFDataPreAligned$fFlatPreAlignedflatunflat unflatWith unflatRaw unflatRawWithflatRawBitstoBools fromBoolsbits paddedBitsasBitsasBytes$fPrettyVectortsttstBitsasListflatBitsallBitsGHC.WordWord32ghc-prim GHC.TypesFloatDoubleWord64copyByteArrayToAddrcopyAddrToByteArray ensureBitsIntGHC.IntInt8Int16Int32Int64WordWord8Word16 byteSwap64 byteSwap32 byteSwap16 eIntegralWNumConstructorsGSizeSumGSize GDecodeSumGDecodeGEncode GHC.GenericsGenericRepfromtoGeneric1Rep1from1to1Datatype datatypeName moduleName packageName isNewtype ConstructorconName conFixity conIsRecordSelectorselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessV1U1Par1unPar1Rec1unRec1K1unK1M1unM1:+:L1R1:*::.:Comp1unComp1RDCRec0D1C1S1URecUAddrUCharUDoubleUFloatUIntUWorduWord#uInt#uFloat#uDouble#uChar#uAddr#precFixityPrefixInfixFixityIPrefixIInfixI AssociativityLeftAssociativeRightAssociativeNotAssociativeSourceUnpackedness SourceUnpackSourceNoUnpackNoSourceUnpackednessSourceStrictness SourceLazy SourceStrictNoSourceStrictnessDecidedStrictness DecidedLazy DecidedStrict DecidedUnpackMetaMetaDataMetaConsMetaSelbyteValbytes