Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parse2 :: (D2 d, CharParsing p) => p d Source #
>>>
parse (parse2 <* eof) "test" "2" :: Either ParseError DecDigit
Right DecDigit2
>>>
parse parse2 "test" "2xyz" :: Either ParseError DecDigit
Right DecDigit2
>>>
isn't _Right (parse parse2 "test" "xyz" :: Either ParseError DecDigit)
True