git.iko.soy/typeable/http-api-data
on master help sign in
Fix docs for instance FromHttpApiData (Maybe a)
ab7e794Nickolay Kudasov
Web/HttpApiData.hs+2−2
@@ -177,8 +177,8 @@ instance FromHttpApiData L.Text where parseUrlPiece = Right . L.fromStrict
177instance FromHttpApiData Day where parseUrlPiece = readEitherUrlPiece
177instance FromHttpApiData Day where parseUrlPiece = readEitherUrlPiece
178
178
179-- |
179-- |
180−-- >>> parseUrlPiece "Just 123" :: Either Text Int
180+-- >>> parseUrlPiece "Just 123" :: Either Text (Maybe Int)
181−-- Just 123
181+-- Right (Just 123)
182instance FromHttpApiData a => FromHttpApiData (Maybe a) where
182instance FromHttpApiData a => FromHttpApiData (Maybe a) where
183 parseUrlPiece "Nothing" = return Nothing
183 parseUrlPiece "Nothing" = return Nothing
184 parseUrlPiece s =
184 parseUrlPiece s =