@@ -284,6 +284,21 @@ parseBoundedTextData = parseMaybeTextData (flip lookup values . T.toLower)
284284 where
285285 values = map (showTextData &&& id) [minBound..maxBound]
286286
287+parseBoundedUrlPiece :: (ToHttpApiData a, Bounded a, Enum a) => Text -> Either Text a
288+parseBoundedUrlPiece = parseMaybeTextData (flip lookup values . T.toLower)
289+ where
290+ values = map (toUrlPiece &&& id) [minBound..maxBound]
291+
292+parseBoundedQueryParam :: (ToHttpApiData a, Bounded a, Enum a) => Text -> Either Text a
293+parseBoundedQueryParam = parseMaybeTextData (flip lookup values . T.toLower)
294+ where
295+ values = map (toQueryParam &&& id) [minBound..maxBound]
296+
297+parseBoundedHeader :: (ToHttpApiData a, Bounded a, Enum a) => Text -> Either Text a
298+parseBoundedHeader = parseMaybeTextData (flip lookup values . T.toLower)
299+ where
300+ values = map (decodeUtf8 . toHeader &&& id) [minBound..maxBound]
301+
287302-- | Parse URL piece using @'Read'@ instance.
288303--
289304-- Use for types which do not involve letters: