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