uѻ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNoneD(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNonee /A ByteString Builder that knows its final size.5Build a ByteString from the given ByteString builder.Append two Builders into one.Serialize a single signed byte. !Serialize a single unsigned byte. 7Serialize a signed 16-bit integer in big endian format. 7Serialize a signed 32-bit integer in big endian format. 7Serialize a signed 64-bit integer in big endian format. :Serialize a signed 64-bit integer in little endian format.ESerialize a signed 64-bit floating point number in big endian format.HSerialize a signed 64-bit floating point number in little endian format.2Inlcude the given ByteString as-is in the builder.Note that because this operation is applied lazily, we will maintain a reference to the ByteString until the builder is executed.    (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalSafe1QV) FoldList represents a list as a foldl' traversal over it.This allows us to avoid allocating new collections for an intermediate representation of various data types that users provide./Builds a FoldList over pairs of items of a map."Builds a FoldList from a Foldable.;Applies the given function to all elements in the FoldList.Note that the function is applied lazily when the results are requested. If the results of the same FoldList are requested multiple times, the function will be called multiple times on the same elements.0Returns a FoldList with the given item repeated n times.cExecutes the given monadic action the given number of times and returns a FoldList of the results. foldlWithKey$ provided by the map implementation.  (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNone<>?QV:%"A simple ByteString parser.KSuccess continuation. Called with the remaining bytestring and the result.6Failure continuation. Called with the failure message.#YRun the parser on the given ByteString. Return either the failure message or the result.$sRun the parser on the given ByteString. Return either the failure message or the result and any left-over content.%take n gets exactly n bytes or fails the parse.&/Produces the next byte and advances the parser.'/Produces the next byte and advances the parser.(9Produces a signed 16-bit integer and advances the parser.)9Produces a signed 32-bit integer and advances the parser.*9Produces a signed 64-bit integer and advances the parser.+bProduces a signed 64-bit integer (parsed in little endian byte ordering) and advances the parser.,@Produces a 64-bit floating point number and advances the parser.-iProduces a 64-bit floating point number (parsed in little endian byte ordering) and advances the parser. "#$%&'()*+,- "#$&'()*+,-%"(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalSafeQV@o1#A simple continuation-based parser. This is just  Either e a in continuation-passing style.-Success continuation. Called with the result.6Failure continuation. Called with the failure message.2Run a Parser! and return the result inside an Either.3Allows handling parse errors.1231(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalSafe &'01QSTVO4Used when the 8 for something is not known at compile time. Typically, this will be pattern matched inside a case statement and code that depends on the TType will be go there.6,Typeclass used to map type-leve TTypes into 86 objects. All TType tags are instances of this class.7\Based on the context in which this is used, it will automatically return the corresponding 8 object.8&Represents the type of a Thrift value.Objects of this type are tagged with one of the TType tags, so this type also acts as a singleton on the TTypes. It allows writing code that can enforce properties about the TType of values at compile time.D list<x>E set<x>F  map<k, v>G  exceptionH unionI structJ stringK binaryL i64M enumN i32O i16P doubleQ byteR boolS#Witness the equality of two ttypes.T#Witness the equality of two TTypes.Implicit version of  ttypeEquality.!456789:;<=>?@ABCDEFGHIJKLMNOPQRST!89:;<=>?@ABC6745STRQPONMLKJIHGFED45678 9:;<=>?@ABC(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalSafe &'01QSTV]dd holds any value, regardless of type. This may be used when the type of the value is not necessarily known at compile time. Typically, this will be pattern matched on and code that depends on the value's 8' will go inside the scope of the match.fValue maps directly to serialized representation of Thrift types. It contains about as much information as what gets sent over the wire. Value# objects are tagged with different 8+ values to indicate the type of the value.JTypical usage will not involve accessing the constructors for this type.  must be used to construct f1 objects or convert them back to original types.sA single item in a mapu,Safely attempt to cast a Value into another.vGet the 8 of a f.defghijklmnopqrstuvfghijklmnopqrstdeuvdef ghijklmnopqrst(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNone&'7;<=FQSTV~uA pair of field identifier and maybe a value stored in the field. If the value is absent, the field will be ignored.pThe Pinchable type class is implemented by types that can be sent or received over the wire as Thrift payloads.8 tag for this type.$For most custom types, this will be I, H, or G. For enums, it will be M5. If the instance automatically derived with use of GenericI, this is not required because it is automatically determined by use of Field or  Enumeration. Convert an a into a f. For structs, , , and  may be used to construct f objects tagged with I.Read a f back into an a. For structs,  and & may be used to retrieve field values.hGPinchable is used to impelment support for automatically deriving instances of Pinchable via generics.8% tag to use for objects of this type.4Converts a generic representation of a value into a f. Converts a f5 back into the generic representation of the object.Implementation of  based on .Implementation of  based on . Construct a  from a field identifier and a  value. Construct a * from a field identifier and an optional  value. Construct a f tagged with a I\ from the given key-value pairs. Optional fields whose values were omitted will be ignored. 3struct [1 .= ("Hello" :: Text), 2 .= (42 :: Int16)] Constructs a f tagged with H. union 1 ("foo" :: ByteString)Given a field ID and a  Value TStruct, get the value stored in the struct under that field ID. The lookup fails if the field is absent or if it's not the same type as expected by this call's context.Given a field ID and a  Value TStruct_, get the optional value stored in the struct under the given field ID. The value returned is Nothing] if it was absent or the wrong type. The lookup fails only if the value retrieved fails to . Helper to  values by matching TTypes. Helper to  maps.  foldlWithKey123123(c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalSafe16g %Message envelope for Thrift payloads.5Name of the method to which this message is targeted.Type of the message.Sequence ID of the message.If the clients expect to receive out-of-order responses, they may use the message ID to map responses back to their corresponding requests. If the client does not expect out-of-order responses, they are free to use the same message ID for all messages.The server's contract regarding message IDs is that all responses must have the same message ID as their corresponding requests.Contents of the message.Type of message being sent.A call to a specific method.1The message body is the request arguments struct.Response to a call.'The message body is the response union.Failure to make a call.Note: This message type is not1 used for exceptions that are defined under the throwsj clause of a method. Those exceptions are part of the response union of the method and are received in a Reply7. This message type is used for Thrift-level failures.&One-way call that expects no response. (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNone&'-13456;<=FKSTV Represents a void result for methods.AThis should be used as an element in a response union along with  tags. For a method, cvoid setValue(..) throws (1: ValueAlreadyExists alreadyExists, 2: InternalError internalError)/Something similar to the following can be used. data SetValueResponse = SetValueAlreadyExists (Field 1 ValueAlreadyExists) | SetValueInternalError (Field 2 InternalError) | SetValueSuccess Void deriving (Generic) instance Pinchable SetValueResponsebData types that represent Thrift enums must have one constructor for each enum item accepting an 2 object tagged with the corresponding enum value. kdata Role = RoleUser (Enumeration 1) | RoleAdmin (Enumeration 2) deriving Generic instance Pinchable Role^Fields of data types that represent structs, unions, and exceptions should be wrapped inside & and tagged with the field identifier. ]data Foo = Foo (Field 1 Text) (Field 2 (Maybe Int32)) deriving Generic instance Pinchable Foo Udata A = A (Field 1 Int32) | B (Field 2 Text) deriving Generic instance Pinchable FooFields which hold Maybe< values are treated as optional. All fields values must be  to automatically derive a  Pinchable! instance for the new data type.;Implemented by TType tags whose values know how to combine."Gets the current value of a field. ,let Foo a' _ = {- ... -} a = getField a'Puts a value inside a field. +Foo (putField "Hello") (putField (Just 42)) A lens on Field( wrappers for use with the lens library. $person & name . field .~ "new value""Convenience function to construct  objects. let role = RoleUser enum  (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNoneQVGProtocols define a specific way to convert values into binary and back. Serializes a f into a ByteString builder. Returns a Builder0 and the total length of the serialized content. Serializes a + and its payload into a ByteString builder. Returns a Builder0 and the total length of the serialized content.Reads a f4 from a ByteString and returns leftovers from parse.Reads a # and its payload from a ByteString.Reads a f from a ByteString. (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNone&'V9Provides an implementation of the Thrift Binary Protocol. Map a TType to its type code. +Map a type code to the corresponding TType. (c) Ben Gamari 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNone &'1QV A compact message type.:Provides an implementation of the Thrift Compact Protocol. Map a TType to its type code.+Map a type code to the corresponding TType.The compact type codea four-bit (unshifted) payload  (c) Abhinav Gupta 2015BSD3!Abhinav Gupta <mail@abhinavg.net> experimentalNoneFTϹEncode the given  value using the given .7unpack $ encode binaryProtocol ["a" :: ByteString, "b"]"[11,0,0,0,2,0,0,0,1,97,0,0,0,1,98] Decode a  value from the using the given ./let s = pack [11,0,0,0,2,0,0,0,1,97,0,0,0,1,98]5decode binaryProtocol s :: Either String [ByteString]Right ["a","b"] Encode the  using the given . Mlet request = GetUserRequest (putField "jsmith") (putField []) message = C "getUser" Call 42 request in encodeMessage binaryProtocol message  Decode a  using the given .RdecodeMessage binaryProtocol bs >>= getMessageBody :: Either String GetUserRequestMRight (GetUserRequest {userName = Field "jsmith", userAttributes = Field []})Build a Message.Read the message contents.This returns a LeftA result if the message contents do not match the requested type.Name of the target method.Type of the message. Message ID.HMessage payload. This must be an object which serializes into a struct.=12678DEFGHIKLMNOPQRdefB12fde867RQPMONLKIHGFED !"#$%&'()*+,-./0123456789:;<=">$?@A78BCCDEFGHIJKLMNOPQQPORSNTMLUKJIHGVWXYZ[\]^_`abcdefgghijklmnopqrstuuvwxyz{|}~   (77                    $pinch-0.3.3.0-7CcPYrUC4JcArXZWF7up50Pinch.Internal.FoldListPinch.Internal.BuilderPinch.Internal.ParserPinch.Internal.PinchablePinch.Internal.TTypePinch.Internal.ValuePinch.Internal.MessagePinch.Internal.GenericPinch.ProtocolPinch.Protocol.BinaryPinch.Protocol.CompactPinch Paths_pinchPinch.Internal.BitsPinch.Internal.Pinchable.ParserPinch.Pinchable PinchablebaseData.TraversablesequencemapM Data.FoldabletoListfoldl'foldrBuilder runBuilderappendint8word8int16BEint32BEint64BEint64LEdoubleBEdoubleLE byteString$fMonoidBuilder$fSemigroupBuilderFoldListfromMap fromFoldablemap replicate replicateM$fMonoidFoldList$fSemigroupFoldList$fHashableFoldList$fNFDataFoldList $fEqFoldList$fTraversableFoldList$fFoldableFoldList$fFunctorFoldList$fShowFoldListParser runParser runParser'takeint16int32int64double $fMonadParser$fApplicativeParser$fFunctorParser parserCatch SomeTTypeIsTTypettypeTTypeTBoolTByteTDoubleTInt16TInt32TInt64TBinaryTStructTMapTSetTList TExceptionTUnionTTextTEnum ttypeEqualityttypeEqT$fHashableTType$fIsTTypeTList $fIsTTypeTSet $fIsTTypeTMap$fIsTTypeTStruct$fIsTTypeTBinary$fIsTTypeTInt64$fIsTTypeTInt32$fIsTTypeTInt16$fIsTTypeTDouble$fIsTTypeTByte$fIsTTypeTBool$fShowSomeTType $fEqTType $fShowTType SomeValueValueVBoolVByteVDoubleVInt16VInt32VInt64VBinaryVStructVMapVNullMapVSetVListMapItem castValue valueTType$fHashableSomeValue$fHashableValue$fNFDataSomeValue $fEqSomeValue $fNFDataValue $fEqValue $fShowValue $fShowMapItem$fHashableMapItem$fNFDataMapItem $fEqMapItem$fShowSomeValue FieldPairTagpinchunpinch GPinchableGTaggPinchgUnpinch genericPinchgenericUnpinch.=?=structunion.:.:?$fPinchableSet$fPinchableHashSet$fPinchableMap$fPinchableHashMap $fPinchable[]$fPinchableVector$fPinchableInt64$fPinchableInt32$fPinchableInt16$fPinchableDouble$fPinchableInt8$fPinchableBool$fPinchableText$fPinchableText0$fPinchableByteString$fPinchableByteString0$fPinchableValueMessage messageName messageType messageIdmessagePayload MessageTypeCallReply ExceptionOneway$fNFDataMessageType$fNFDataMessage$fShowMessageType$fEqMessageType$fDataMessageType$fGenericMessageType $fShowMessage $fEqMessage$fGenericMessageVoid EnumerationFieldgetFieldputFieldfieldenum$fGPinchable:+:$fGPinchableM1$fGPinchableM10$fGPinchable:*:$fCombinableTStruct$fGPinchableK1$fGPinchableK10$fGPinchableK11$fNFDataEnumeration$fGPinchableK12$fBoundedField $fEqField $fEnumField$fFoldableField$fFunctorField$fGenericField$fSemigroupField $fMonoidField $fNFDataField $fOrdField $fShowField$fTraversableField$fEqEnumeration$fGenericEnumeration$fOrdEnumeration$fShowEnumeration$fEqVoid $fGenericVoid $fOrdVoid $fShowVoidProtocolserializeValueserializeMessagedeserializeValue'deserializeMessagedeserializeValuebinaryProtocolcompactProtocol$fIsTTypeTStopencodedecode encodeMessage decodeMessage mkMessagegetMessageBodyversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName w16ShiftL w32ShiftL w64ShiftLBSuccessFailureunParsercheckedUnpinchpinchMap Combinablecombine toTypeCode fromTypeCodeCType toCompactCodefromCompactCode compactCode' SomeCTypeCStop CBoolTrue CBoolFalseCByteCInt16CInt32CInt64CDoubleCBinaryCListCSetCMapCStruct