| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Web.Growler.Parsable
- class Parsable a where
- parseParam :: ByteString -> Either ByteString a
- parseParamList :: ByteString -> Either ByteString [a]
- readEither :: Read a => ByteString -> Either ByteString a
Documentation
Minimum implemention: parseParam
Minimal complete definition
Methods
parseParam :: ByteString -> Either ByteString a Source
Take a ByteString value and parse it as a, or fail with a message.
parseParamList :: ByteString -> Either ByteString [a] Source
Default implementation parses comma-delimited lists.
parseParamList t = mapM parseParam (BS.split ',' t)
Instances
| Parsable Bool | |
| Parsable Char | Overrides default |
| Parsable Double | |
| Parsable Float | |
| Parsable Int | |
| Parsable Integer | |
| Parsable () | Checks if parameter is present and is null-valued, not a literal '()'.
If the URI requested is: '/foo?bar=()&baz' then |
| Parsable ByteString | |
| Parsable Text | |
| Parsable Text | |
| Parsable a => Parsable [a] |
readEither :: Read a => ByteString -> Either ByteString a Source