Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides a simple parser for parsing input event control sequences.
This module is exposed for testing purposes only; applications should never need to import this directly.
Documentation
readInt :: Parser Int Source #
Read an integer from the input stream. If an integer cannot be read, fail parsing. E.g. calling readInt on an input of "123abc" will return '123' and consume those characters.
readChar :: Parser Char Source #
Read a character from the input stream. If one cannot be read (e.g. we are out of characters), fail parsing.
expectChar :: Char -> Parser () Source #
Read a character from the input stream and fail parsing if it is not the specified character.