@@ -171,14 +171,19 @@ parseUrlPieceWithPrefix pattern input
171171 where
172172 (prefix, rest) = T.splitAt (T.length pattern) input
173173
174+-- $setup
175+-- >>> data BasicAuthToken = BasicAuthToken Text deriving (Show)
176+-- >>> instance FromHttpApiData BasicAuthToken where parseHeader h = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h; parseQueryParam p = BasicAuthToken <$> parseQueryParam p
177+
174178-- | Parse given bytestring then parse the rest of the input using @'parseHeader'@.
175179--
176−-- >>> data BasicAuthToken = BasicAuthToken Text deriving (Show)
177−-- >>> :{
180+-- @
181+-- data BasicAuthToken = BasicAuthToken Text deriving (Show)
182+--
178183-- instance FromHttpApiData BasicAuthToken where
179−-- parseHeader h = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h
180−-- parseQueryParam p = BasicAuthToken <$> parseQueryParam p
181−-- :}
184+-- parseHeader h = BasicAuthToken \<$\> parseHeaderWithPrefix "Basic " h
185+-- parseQueryParam p = BasicAuthToken \<$\> parseQueryParam p
186+-- @
182187--
183188-- >>> parseHeader "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" :: Either Text BasicAuthToken
184189-- Right (BasicAuthToken "QWxhZGRpbjpvcGVuIHNlc2FtZQ==")