Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class DB d where
- parseB :: (DB d, CharParsing p) => p d
Documentation
parseB :: (DB d, CharParsing p) => p d Source #
>>>
parse (parseB <* eof) "test" "B" :: Either ParseError Digit
Right B
>>>
parse parseB "test" "Bxyz" :: Either ParseError Digit
Right B
>>>
isn't _Right (parse parseB "test" "xyz" :: Either ParseError Digit)
True
\c -> c /= 'B' ==> isn't _Right (parse parseB "test" [c] :: Either ParseError Digit)