@@ -209,8 +209,21 @@ readMaybeTextData :: Read a => Text -> Maybe a
209readMaybeTextData = readMaybe . T.unpack
209readMaybeTextData = readMaybe . T.unpack
211-- | Parse URL piece using @'Read'@ instance.
211-- | Parse URL piece using @'Read'@ instance.
213+-- Use for types which do not involve letters:
215+-- >>> readTextData "1991-06-02" :: Either Text Day
218+-- This parser is case sensitive and will not match @'showTextData'@
219+-- in presense of letters:
221+-- >>> readTextData "true" :: Either Text Bool
222+-- Left "could not parse: `true'"
224+-- See @'parseBoundedCaseInsensitiveTextData'@.
212−readEitherTextData :: Read a => Text -> Either Text a
225+readTextData :: Read a => Text -> Either Text a
213−readEitherTextData = parseMaybeTextData readMaybeTextData
226+readTextData = parseMaybeTextData readMaybeTextData
215-- | Run @'Reader'@ as HTTP API data parser.
228-- | Run @'Reader'@ as HTTP API data parser.
216runReader :: Reader a -> Text -> Either Text a
229runReader :: Reader a -> Text -> Either Text a
@@ -355,7 +368,7 @@ instance FromHttpApiData L.Text where parseUrlPiece = Right . L.fromStrict
356-- >>> toGregorian <$> parseUrlPiece "2016-12-01"
369-- >>> toGregorian <$> parseUrlPiece "2016-12-01"
357-- Right (2016,12,1)
370-- Right (2016,12,1)
358−instance FromHttpApiData Day where parseUrlPiece = readEitherTextData
371+instance FromHttpApiData Day where parseUrlPiece = readTextData
360instance FromHttpApiData All where parseUrlPiece = fmap All . parseUrlPiece
373instance FromHttpApiData All where parseUrlPiece = fmap All . parseUrlPiece
361instance FromHttpApiData Any where parseUrlPiece = fmap Any . parseUrlPiece
374instance FromHttpApiData Any where parseUrlPiece = fmap Any . parseUrlPiece