!P      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None 023469;T6Lenient parameters.  combinators always return .Parse value from HTTP API data.WARNING: Do not derive this using DeriveAnyClass3 as the generated instance will loop indefinitely.Parse URL path piece.Parse HTTP header value.Parse query param value.Convert value to HTTP API data.WARNING: Do not derive this using DeriveAnyClass3 as the generated instance will loop indefinitely.Convert to URL path piece. cConvert to a URL path piece, making sure to encode any special chars. The default definition uses ;, but this may be overriden with a more efficient version. Convert to HTTP header value. Convert to query param value. 0Convert multiple values to a list of URL pieces.toUrlPieces [1, 2, 3] :: [Text] ["1","2","3"] Parse multiple URL pieces.6parseUrlPieces ["true", "false"] :: Either Text [Bool]Right [True,False]=parseUrlPieces ["123", "hello", "world"] :: Either Text [Int]CLeft "could not parse: `hello' (input does not start with a digit)"<Convert multiple values to a list of query parameter values.LtoQueryParams [fromGregorian 2015 10 03, fromGregorian 2015 12 01] :: [Text]["2015-10-03","2015-12-01"] Parse multiple query parameters.5parseQueryParams ["1", "2", "3"] :: Either Text [Int] Right [1,2,3]<parseQueryParams ["64", "128", "256"] :: Either Text [Word8]9Left "out of bounds: `256' (should be between 0 and 255)"Parse URL path piece in a .$parseUrlPieceMaybe "12" :: Maybe IntJust 12Parse HTTP header value in a .&parseHeaderMaybe "hello" :: Maybe Text Just "hello"Parse query param value in a .)parseQueryParamMaybe "true" :: Maybe Bool Just TrueDefault parsing error.Convert  parser into  # parser with default error message. Lower case.Convert to URL piece using - instance. The result is always lower cased.showTextData True"true"CThis can be used as a default implementation for enumeration types:-data MyData = Foo | Bar | Baz deriving (Show)=instance ToHttpApiData MyData where toUrlPiece = showTextDatatoUrlPiece Foo"foo"Like , but returns .Case insensitive.NParse given text case insensitive and then parse the rest of the input using .<parseUrlPieceWithPrefix "Just " "just 10" :: Either Text IntRight 10:parseUrlPieceWithPrefix "Left " "left" :: Either Text BoolLeft "could not parse: `left'"This can be used to implement  for single field constructors:"data Foo = Foo Int deriving (Show)]instance FromHttpApiData Foo where parseUrlPiece s = Foo <$> parseUrlPieceWithPrefix "Foo " s(parseUrlPiece "foo 1" :: Either Text Foo Right (Foo 1)>Parse given bytestring then parse the rest of the input using . data BasicAuthToken = BasicAuthToken Text deriving (Show) instance FromHttpApiData BasicAuthToken where parseHeader h = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h parseQueryParam p = BasicAuthToken <$> parseQueryParam p NparseHeader "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" :: Either Text BasicAuthToken5Right (BasicAuthToken "QWxhZGRpbjpvcGVuIHNlc2FtZQ==")Case insensitive.NParse given text case insensitive and then parse the rest of the input using .6parseQueryParamWithPrefix "z" "z10" :: Either Text IntRight 10Case insensitive.)Parse values case insensitively based on  instance./parseBoundedTextData "true" :: Either Text Bool Right True0parseBoundedTextData "FALSE" :: Either Text Bool Right FalseCThis can be used as a default implementation for enumeration types:<data MyData = Foo | Bar | Baz deriving (Show, Bounded, Enum)Jinstance FromHttpApiData MyData where parseUrlPiece = parseBoundedTextData)parseUrlPiece "foo" :: Either Text MyData Right FooHLookup values based on a precalculated mapping of their representations.7Parse values based on a precalculated mapping of their  representation.8parseBoundedEnumOf toUrlPiece "true" :: Either Text Bool Right TrueFor case sensitive parser see .Case insensitive.KParse values case insensitively based on a precalculated mapping of their  representations.:parseBoundedEnumOfI toUrlPiece "FALSE" :: Either Text Bool Right FalseFor case sensitive parser see .Case insensitive.)Parse values case insensitively based on  instance. Uses  to get possible values.Case insensitive.)Parse values case insensitively based on  instance. Uses   to get possible values. Parse values based on  instance. Uses   to get possible values.!Parse URL piece using   instance.+Use for types which do not involve letters:,readTextData "1991-06-02" :: Either Text DayRight 1991-06-021This parser is case sensitive and will not match  in presense of letters:4readTextData (showTextData True) :: Either Text BoolLeft "could not parse: `true'"See ."Run   as HTTP API data parser.#Run  6 to parse bounded integral value with bounds checking./parseBounded decimal "256" :: Either Text Word89Left "out of bounds: `256' (should be between 0 and 255)"$*Convert to a URL-encoded path piece using . Notes: this function does not check if the result contains unescaped characters! This function can be used to override  B as a more efficient implementation when the resulting URL piece never has to be escaped.*<parseUrlPiece "Right 123" :: Either Text (Either String Int)Right (Right 123)+3parseUrlPiece "Just 123" :: Either Text (Maybe Int)Right (Just 123)4;parseUrlPiece "2015-10-03T00:14:24Z" :: Either Text UTCTimeRight 2015-10-03 00:14:24 UTC5AparseUrlPiece "2015-10-03T14:55:01+0000" :: Either Text ZonedTimeRight 2015-10-03 14:55:01 +0000?parseQueryParam "2016-12-31T01:00:00Z" :: Either Text ZonedTimeRight 2016-12-31 01:00:00 +00006<parseUrlPiece "2015-10-03T14:55:01" :: Either Text LocalTimeRight 2015-10-03 14:55:0175parseUrlPiece "14:55:01.333" :: Either Text TimeOfDayRight 14:55:01.3338*toGregorian <$> parseUrlPiece "2016-12-01"Right (2016,12,1)L Parsing a  ' value is always an error, considering  % as a data type with no constructors.M%showVersion <$> parseUrlPiece "1.2.3" Right "1.2.3"O#parseUrlPiece "_" :: Either Text ()Right ()P,toUrlPiece (Left "err" :: Either String Int) "left err")toUrlPiece (Right 3 :: Either String Int) "right 3"QtoUrlPiece (Just "Hello") "just Hello"]5toUrlPiece $ UTCTime (fromGregorian 2015 10 03) 864.5"2015-10-03T00:14:24.5Z"^ZtoUrlPiece $ ZonedTime (LocalTime (fromGregorian 2015 10 03) (TimeOfDay 14 55 51.001)) utc"2015-10-03T14:55:51.001+0000"_JtoUrlPiece $ LocalTime (fromGregorian 2015 10 03) (TimeOfDay 14 55 21.687)"2015-10-03T14:55:21.687"`!toUrlPiece $ TimeOfDay 14 55 23.1 "14:55:23.1"a%toUrlPiece (fromGregorian 2015 10 03) "2015-10-03"s!toUrlPiece (Version [1, 2, 3] [])"1.2.3"u toUrlPiece ()"_"v  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu'  !"#$%&v   !"#$utsrqponmlkjihgfedcba%`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&m  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuNone*+,569:;<=DIQRT~ -based deriving options for  and ."A common use case for non-default ~+ is to strip a prefix off of field labels: Vdata Project = Project { projectName :: String , projectSize :: Int } deriving ( , ) myOptions :: ~ myOptions = ~ {  =   toLower .  ( "project") } instance  Project where  =  myOptions instance  Project where  =  myOptions LurlEncodeAsForm Project { projectName = "http-api-data", projectSize = 172 }"size=172&name=http-api-data"DurlDecodeAsForm "name=http-api-data&size=172" :: Either Text ProjectBRight (Project {projectName = "http-api-data", projectSize = 172})XFunction applied to field labels. Handy for removing common record prefixes for example.Parse  into a value.An example type and instance: Ddata Person = Person { name :: String , age :: Int } instance  Person where  f = Person   "name" f   "age" f Instead of manually writing < instances you can use a default generic implementation of .To do that, simply add  deriving  ( clause to your datatype and declare a ; instance for your datatype without giving definition for .?For instance, the previous example can be simplified into this: Fdata Person = Person { name :: String , age :: Int } deriving (  ) instance  Person The default implementation of  is -. It only works for records and it will use  for each field's value.Parse  into a value.Convert a value into .An example type and instance: f{-# LANGUAGE OverloadedLists #-} data Person = Person { name :: String , age :: Int } instance  Person where  person = [ ("name",   (name person)) , ("age",   (age person)) ] Instead of manually writing < instances you can use a default generic implementation of .To do that, simply add  deriving  ( clause to your datatype and declare a ; instance for your datatype without giving definition for .?For instance, the previous example can be simplified into this: Fdata Person = Person { name :: String , age :: Int } deriving (  ) instance  Person The default implementation of  is .Convert a value into .,The contents of a form, not yet URL-encoded. can be URL-encoded with  and URL-decoded with .6Typeclass for types that can be parsed from keys of a . This is the reverse of .Parse a key of a .2Typeclass for types that can be used as keys in a -like container (like ).Render a key for a .1Convert a list of entries groupped by key into a .=fromEntriesByKey [("name",["Nick"]),("color",["red","blue"])];fromList [("color","red"),("color","blue"),("name","Nick")]A  -based implementation of /. This is used as a default implementation in .RNote that this only works for records (i.e. product data types with named fields): Fdata Person = Person { name :: String , age :: Int } deriving ( ) =In this implementation each field's value gets encoded using  ". Two field types are exceptions:for values of type  a an entry is added to the  only when it is  x and the encoded value is   x;  values are omitted from the ;for values of type [a] (except []g) an entry is added for every item in the list; if the list is empty no entries are added to the ;Here's an example: ldata Post = Post { title :: String , subtitle :: Maybe String , comments :: [String] } deriving ( ,  ) instance  Post \urlEncodeAsForm Post { title = "Test", subtitle = Nothing, comments = ["Nice post!", "+1"] }2"comments=Nice%20post%21&comments=%2B1&title=Test"Parse a ( into a list of entries groupped by key.gtoEntriesByKey [("name", "Nick"), ("color", "red"), ("color", "white")] :: Either Text [(Text, [Text])]3Right [("color",["red","white"]),("name",["Nick"])]A  -based implementation of /. This is used as a default implementation in .RNote that this only works for records (i.e. product data types with named fields): Fdata Person = Person { name :: String , age :: Int } deriving ( ) =In this implementation each field's value gets decoded using ". Two field types are exceptions:for values of type  a& an entry is parsed if present in the  and the is decoded with #; if no entry is present result is ;for values of type [a] (except []<) all entries are parsed to produce a list of parsed values;Here's an example: ldata Post = Post { title :: String , subtitle :: Maybe String , comments :: [String] } deriving ( ,  ) instance  Post VurlDecodeAsForm "comments=Nice%20post%21&comments=%2B1&title=Test" :: Either Text PostQRight (Post {title = "Test", subtitle = Nothing, comments = ["Nice post!","+1"]}) Encode a  to an !application/x-www-form-urlencoded .Key-value pairs get encoded to  key=value and separated by &:8urlEncodeForm [("name", "Julian"), ("lastname", "Arni")]"lastname=Arni&name=Julian"+Keys with empty values get encoded to just key (without the = sign):urlEncodeForm [("is_test", "")] "is_test"Empty keys are allowed too:urlEncodeForm [("", "foobar")] "=foobar"XHowever, if not key and value are empty, the key-value pair is ignored. (This prevents  .  from being a true isomorphism).urlEncodeForm [("", "")]""Everything is escaped with escapeURIString  isUnreserved:*urlEncodeForm [("fullname", "Andres Lh")]"fullname=Andres%20L%C3%B6h" Decode an !application/x-www-form-urlencoded  to a .%Key-value pairs get decoded normally:(urlDecodeForm "name=Greg&lastname=Weber"7Right (fromList [("lastname","Weber"),("name","Greg")]);Keys with no values get decoded to pairs with empty values.urlDecodeForm "is_test"!Right (fromList [("is_test","")])Empty keys are allowed:urlDecodeForm "=foobar" Right (fromList [("","foobar")]),The empty string gets decoded into an empty :urlDecodeForm ""Right (fromList [])Everything is un-escaped with unEscapeString:*urlDecodeForm "fullname=Andres%20L%C3%B6h"/Right (fromList [("fullname","Andres L\246h")])-Improperly formed strings result in an error:(urlDecodeForm "this=has=too=many=equals"1Left "not a valid pair: this=has=too=many=equals"/This is a convenience function for decoding a !application/x-www-form-urlencoded 1 directly to a datatype that has an instance of .This is effectively   .:urlDecodeAsForm "name=Dennis&age=22" :: Either Text Person*Right (Person {name = "Dennis", age = 22})MThis is a convenience function for encoding a datatype that has instance of  directly to a !application/x-www-form-urlencoded .This is effectively  . .2urlEncodeAsForm Person {name = "Dennis", age = 22}"age=22&name=Dennis"2Find all values corresponding to a given key in a .lookupAll "name" [][]#lookupAll "name" [("name", "Oleg")]["Oleg"]6lookupAll "name" [("name", "Oleg"), ("name", "David")]["Oleg","David"]JLookup an optional value for a key. Fail if there is more than one value.lookupMaybe "name" [] Right Nothing%lookupMaybe "name" [("name", "Oleg")]Right (Just "Oleg")8lookupMaybe "name" [("name", "Oleg"), ("name", "David")]Left "Duplicate key \"name\""OLookup a unique value for a key. Fail if there is zero or more than one value.lookupUnique "name" []"Left "Could not find key \"name\""&lookupUnique "name" [("name", "Oleg")] Right "Oleg"9lookupUnique "name" [("name", "Oleg"), ("name", "David")]Left "Duplicate key \"name\""'Lookup all values for a given key in a  and parse them with .(parseAll "age" [] :: Either Text [Word8]Right []FparseAll "age" [("age", "8"), ("age", "seven")] :: Either Text [Word8]CLeft "could not parse: `seven' (input does not start with a digit)"DparseAll "age" [("age", "8"), ("age", "777")] :: Either Text [Word8]9Left "out of bounds: `777' (should be between 0 and 255)"DparseAll "age" [("age", "12"), ("age", "25")] :: Either Text [Word8] Right [12,25];Lookup an optional value for a given key and parse it with 4. Fail if there is more than one value for the key.0parseMaybe "age" [] :: Either Text (Maybe Word8) Right NothingLparseMaybe "age" [("age", "12"), ("age", "25")] :: Either Text (Maybe Word8)Left "Duplicate key \"age\""@parseMaybe "age" [("age", "seven")] :: Either Text (Maybe Word8)CLeft "could not parse: `seven' (input does not start with a digit)">parseMaybe "age" [("age", "777")] :: Either Text (Maybe Word8)9Left "out of bounds: `777' (should be between 0 and 255)"<parseMaybe "age" [("age", "7")] :: Either Text (Maybe Word8)Right (Just 7)8Lookup a unique value for a given key and parse it with <. Fail if there is zero or more than one value for the key.)parseUnique "age" [] :: Either Text Word8!Left "Could not find key \"age\""EparseUnique "age" [("age", "12"), ("age", "25")] :: Either Text Word8Left "Duplicate key \"age\""9parseUnique "age" [("age", "seven")] :: Either Text Word8CLeft "could not parse: `seven' (input does not start with a digit)"7parseUnique "age" [("age", "777")] :: Either Text Word89Left "out of bounds: `777' (should be between 0 and 255)"5parseUnique "age" [("age", "7")] :: Either Text Word8Right 7Default encoding ~. ~ {  = id } ~$~~u~None  !   !None~~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~         !"#$ % &'()*+,-./*http-api-data-0.3.7-DqWCxzgtgsQI07nncmDeDeWeb.Internal.HttpApiDataWeb.Internal.FormUrlEncodedWeb.HttpApiDataWeb.FormUrlEncoded LenientDatagetLenientDataFromHttpApiData parseUrlPiece parseHeaderparseQueryParam ToHttpApiData toUrlPiecetoEncodedUrlPiecetoHeader toQueryParam toUrlPiecesparseUrlPieces toQueryParamsparseQueryParamsparseUrlPieceMaybeparseHeaderMaybeparseQueryParamMaybedefaultParseErrorparseMaybeTextData showTextDatashowtparseUrlPieceWithPrefixparseHeaderWithPrefixparseQueryParamWithPrefixparseBoundedTextDatalookupBoundedEnumOfparseBoundedEnumOfparseBoundedEnumOfIparseBoundedUrlPieceparseBoundedQueryParamparseBoundedHeader readTextData runReader parseBoundedunsafeToEncodedUrlPiecetimeToUrlPiecerunAtto$fFromHttpApiDataLenientData$fFromHttpApiDataUUID$fToHttpApiDataUUID$fFromHttpApiDataEither$fFromHttpApiDataMaybe$fFromHttpApiDataLast$fFromHttpApiDataFirst$fFromHttpApiDataProduct$fFromHttpApiDataSum$fFromHttpApiDataDual$fFromHttpApiDataAny$fFromHttpApiDataAll $fFromHttpApiDataNominalDiffTime$fFromHttpApiDataUTCTime$fFromHttpApiDataZonedTime$fFromHttpApiDataLocalTime$fFromHttpApiDataTimeOfDay$fFromHttpApiDataDay$fFromHttpApiDataText$fFromHttpApiDataText0$fFromHttpApiData[]$fFromHttpApiDataWord64$fFromHttpApiDataWord32$fFromHttpApiDataWord16$fFromHttpApiDataWord8$fFromHttpApiDataWord$fFromHttpApiDataInteger$fFromHttpApiDataInt64$fFromHttpApiDataInt32$fFromHttpApiDataInt16$fFromHttpApiDataInt8$fFromHttpApiDataInt$fFromHttpApiDataFloat$fFromHttpApiDataDouble$fFromHttpApiDataOrdering$fFromHttpApiDataBool$fFromHttpApiDataNatural$fFromHttpApiDataVoid$fFromHttpApiDataVersion$fFromHttpApiDataChar$fFromHttpApiData()$fToHttpApiDataEither$fToHttpApiDataMaybe$fToHttpApiDataLast$fToHttpApiDataFirst$fToHttpApiDataProduct$fToHttpApiDataSum$fToHttpApiDataDual$fToHttpApiDataAny$fToHttpApiDataAll$fToHttpApiDataText$fToHttpApiDataText0$fToHttpApiData[]$fToHttpApiDataNominalDiffTime$fToHttpApiDataUTCTime$fToHttpApiDataZonedTime$fToHttpApiDataLocalTime$fToHttpApiDataTimeOfDay$fToHttpApiDataDay$fToHttpApiDataWord64$fToHttpApiDataWord32$fToHttpApiDataWord16$fToHttpApiDataWord8$fToHttpApiDataWord$fToHttpApiDataInteger$fToHttpApiDataInt64$fToHttpApiDataInt32$fToHttpApiDataInt16$fToHttpApiDataInt8$fToHttpApiDataInt$fToHttpApiDataFloat$fToHttpApiDataDouble$fToHttpApiDataOrdering$fToHttpApiDataBool$fToHttpApiDataNatural$fToHttpApiDataVoid$fToHttpApiDataVersion$fToHttpApiDataChar$fToHttpApiData()$fEqLenientData$fOrdLenientData$fShowLenientData$fReadLenientData$fDataLenientData$fFunctorLenientData$fFoldableLenientData$fTraversableLenientData FormOptionsfieldLabelModifier GFromForm gFromFormFromFormfromFormGToFormgToForm NotSupportedProxy3ToFormtoFormFormunForm FromFormKey parseFormKey ToFormKey toFormKeyfromEntriesByKey genericToFormtoEntriesByKeygenericFromForm urlEncodeForm urlDecodeFormurlDecodeAsFormurlEncodeAsForm lookupAll lookupMaybe lookupUniqueparseAll parseMaybe parseUniquedefaultFormOptions$fGFromFormkt:+:$fGFromFormktM1$fGFromFormktM10$fGFromFormktM11$fGFromFormktM12$fGFromFormktM13$fGFromFormktM14$fGFromFormkt:*:$fFromFormIntMap$fFromFormHashMap $fFromFormMap $fFromForm[]$fFromFormForm$fGToFormkt:+: $fGToFormktM1$fGToFormktM10$fGToFormktM11$fGToFormktM12$fGToFormktM13$fGToFormktM14$fGToFormkt:*:$fToFormIntMap$fToFormHashMap $fToFormMap $fToForm[] $fToFormForm $fIsListForm $fShowForm$fFromFormKeyNatural$fFromFormKeyVoid$fFromFormKeyProduct$fFromFormKeySum$fFromFormKeyDual$fFromFormKeyAny$fFromFormKeyAll$fFromFormKeyText$fFromFormKeyText0$fFromFormKey[]$fFromFormKeyNominalDiffTime$fFromFormKeyUTCTime$fFromFormKeyZonedTime$fFromFormKeyLocalTime$fFromFormKeyDay$fFromFormKeyWord64$fFromFormKeyWord32$fFromFormKeyWord16$fFromFormKeyWord8$fFromFormKeyWord$fFromFormKeyInteger$fFromFormKeyInt64$fFromFormKeyInt32$fFromFormKeyInt16$fFromFormKeyInt8$fFromFormKeyInt$fFromFormKeyFloat$fFromFormKeyDouble$fFromFormKeyOrdering$fFromFormKeyBool$fFromFormKeyChar$fFromFormKey()$fToFormKeyNatural$fToFormKeyVoid$fToFormKeyProduct$fToFormKeySum$fToFormKeyDual$fToFormKeyAny$fToFormKeyAll$fToFormKeyText$fToFormKeyText0 $fToFormKey[]$fToFormKeyNominalDiffTime$fToFormKeyUTCTime$fToFormKeyZonedTime$fToFormKeyLocalTime$fToFormKeyDay$fToFormKeyWord64$fToFormKeyWord32$fToFormKeyWord16$fToFormKeyWord8$fToFormKeyWord$fToFormKeyInteger$fToFormKeyInt64$fToFormKeyInt32$fToFormKeyInt16$fToFormKeyInt8$fToFormKeyInt$fToFormKeyFloat$fToFormKeyDouble$fToFormKeyOrdering$fToFormKeyBool$fToFormKeyChar $fToFormKey()$fEqForm $fReadForm $fGenericForm $fMonoidFormbase Data.EitherRight'http-types-0.9.1-BFCRaaQNE88DRttqyvtXtzNetwork.HTTP.Types.URIencodePathSegmentsRelativeGHC.BaseMaybeEither#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.InternalTextGHC.ShowShowshowGHC.ReadReadData.Text.ReadReader Data.VoidVoid GHC.GenericsGenericmapGHC.Listdrop Data.Foldablelength Data.Functor<$><*>containers-0.5.7.1 Data.Map.BaseMapJustNothingghc-prim GHC.TypesCharbytestring-0.10.8.1Data.ByteString.Lazy.Internal ByteString Control.Monad<=<