@@ -5,7 +5,7 @@
55module Web.HttpApiData (
66 ToHttpApiData (..),
77 FromHttpApiData (..),
8− parseMaybeUrlPiece,
8+ parseMaybeHttpApiData,
99 showUrlPiece,
1010 readMaybeUrlPiece,
1111 readEitherUrlPiece,
@@ -58,10 +58,10 @@ class FromHttpApiData a where
5858 parseQueryParam = parseUrlPiece
5959
6060-- | Convert @'Maybe'@ parser into @'Either' 'Text'@ parser with default error message.
61−parseMaybeUrlPiece :: (Text -> Maybe a) -> (Text -> Either Text a)
62−parseMaybeUrlPiece parse input =
61+parseMaybeHttpApiData :: (Text -> Maybe a) -> (Text -> Either Text a)
62+parseMaybeHttpApiData parse input =
6363 case parse input of
64− Nothing -> Left ("parseUrlPiece: could not convert: `" <> input <> "'")
64+ Nothing -> Left ("could not convert: `" <> input <> "'")
6565 Just val -> Right val
6666
6767-- | Convert to URL piece using @'Show'@ instance.
@@ -74,7 +74,7 @@ readMaybeUrlPiece = readMaybe . Text.unpack
7474
7575-- | Parse URL piece using @'Read'@ instance.
7676readEitherUrlPiece :: Read a => Text -> Either Text a
77−readEitherUrlPiece = parseMaybeUrlPiece readMaybeUrlPiece
77+readEitherUrlPiece = parseMaybeHttpApiData readMaybeUrlPiece
7878
7979-- | Run @'Reader'@ as HTTP API data parser.
8080runReader :: Reader a -> Text -> Either Text a