Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parseBb :: (DBb d, CharParsing p) => p d Source #
>>>
parse (parseBb <* eof) "test" "B" :: Either ParseError Digit
Right B
>>>
parse parseBb "test" "Bxyz" :: Either ParseError Digit
Right B
>>>
parse (parseBb <* eof) "test" "b" :: Either ParseError Digit
Right b
>>>
parse parseBb "test" "bxyz" :: Either ParseError Digit
Right b
>>>
isn't _Right (parse parseBb "test" "xyz" :: Either ParseError Digit)
True
\c -> (c `notElem` "Bb") ==> isn't _Right (parse parseBb "test" [c] :: Either ParseError Digit)