Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parseFf :: (DFf d, CharParsing p) => p d Source #
>>>
parse (parseFf <* eof) "test" "F" :: Either ParseError Digit
Right F
>>>
parse parseFf "test" "Fxyz" :: Either ParseError Digit
Right F
>>>
parse (parseFf <* eof) "test" "f" :: Either ParseError Digit
Right f
>>>
parse parseFf "test" "fxyz" :: Either ParseError Digit
Right f
>>>
isn't _Right (parse parseFf "test" "xyz" :: Either ParseError Digit)
True
\c -> (c `notElem` "Ff") ==> isn't _Right (parse parseFf "test" [c] :: Either ParseError Digit)