@@ -49,7 +49,7 @@ class ToHttpApiData a where
49 toQueryParam :: a -> Text
49 toQueryParam :: a -> Text
50 toQueryParam = toUrlPiece
50 toQueryParam = toUrlPiece
52−-- | Convert value from HTTP API data.
52+-- | Parse value from HTTP API data.
53class FromHttpApiData a where
53class FromHttpApiData a where
54 {-# MINIMAL parseUrlPiece | parseQueryParam #-}
54 {-# MINIMAL parseUrlPiece | parseQueryParam #-}
55 -- | Parse URL path piece.
55 -- | Parse URL path piece.
@@ -66,7 +66,7 @@ class FromHttpApiData a where
67-- | Default parsing error.
67-- | Default parsing error.
68defaultParseError :: Text -> Either Text a
68defaultParseError :: Text -> Either Text a
69−defaultParseError input = Left ("could not convert: `" <> input <> "'")
69+defaultParseError input = Left ("could not parse: `" <> input <> "'")
71-- | Convert @'Maybe'@ parser into @'Either' 'Text'@ parser with default error message.
71-- | Convert @'Maybe'@ parser into @'Either' 'Text'@ parser with default error message.
72parseMaybeTextData :: (Text -> Maybe a) -> (Text -> Either Text a)
72parseMaybeTextData :: (Text -> Maybe a) -> (Text -> Either Text a)
@@ -95,7 +95,7 @@ showTextData = T.toLower . T.pack . show
95-- >>> parseUrlPieceWithPrefix "Just " "just 10" :: Either Text Int
95-- >>> parseUrlPieceWithPrefix "Just " "just 10" :: Either Text Int
96-- Right 10
96-- Right 10
97-- >>> parseUrlPieceWithPrefix "Left " "left" :: Either Text Bool
97-- >>> parseUrlPieceWithPrefix "Left " "left" :: Either Text Bool
98−-- Left "could not convert: `left'"
98+-- Left "could not parse: `left'"
100-- This can be used to implement @'FromHttpApiData'@ for single field constructors:
100-- This can be used to implement @'FromHttpApiData'@ for single field constructors: