Parse a newline byte.
Modulemegaparsec-9.7.0Haskell2010
Text.Megaparsec.Byte
Commonly used binary parsers.
- 24 values
- Packagemegaparsec-9.7.0
- Exports24
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceByte.hs
Simple parsers
8 declarationsParse a carriage return character followed by a newline character. Return the sequence of characters parsed.
Parse a tab character.
Like space, but does not accept newlines and carriage returns.
Like space1, but does not accept newlines and carriage returns.
Categories of characters
12 declarationsParse a control character.
Parse a space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab.
Parse an upper-case character.
Parse a lower-case alphabetic character.
Parse an alphabetic character: lower-case or upper-case.
Parse an alphabetic or digit characters.
Parse a printable character: letter, number, mark, punctuation, symbol or space.
Parse an ASCII digit, i.e between “0” and “9”.
Parse a binary digit, i.e. “0” or “1”.
Parse an octal digit, i.e. between “0” and “7”.
Parse a hexadecimal digit, i.e. between “0” and “9”, or “a” and “f”, or “A” and “F”.
Parse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set.
Single byte
2 declarationsA type-constrained version of single.
newline = char 10The same as char but case-insensitive. This parser returns the actually parsed character preserving its case.
parseTest (char' 101) "E"69 -- 'E'parseTest (char' 101) "G"1:1:unexpected 'G'expecting 'E' or 'e'
Sequence of bytes
2 declarationsA synonym for chunk.
The same as string, but case-insensitive. On success returns string cased as the parsed input.
parseTest (string' "foobar") "foObAr""foObAr"