Parse a newline byte.
Modulemegaparsec-9.5.0Haskell2010
Text.Megaparsec.Byte
Commonly used binary parsers.
Synopsis
- value newline
- value crlf
- value eol
- value tab
- value space
- value hspace
- value space1
- value hspace1
- value controlChar
- value spaceChar
- value upperChar
- value lowerChar
- value letterChar
- value alphaNumChar
- value printChar
- value digitChar
- value binDigitChar
- value octDigitChar
- value hexDigitChar
- value asciiChar
- value char
- value char'
- value string
- value string'
- Packagemegaparsec-9.5.0
- Exports24
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceByte.hs
Simple parsers
Parse 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
Parse 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
A 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
A synonym for chunk.
The same as string, but case-insensitive. On success returns string cased as the parsed input.
parseTest (string' "foobar") "foObAr""foObAr"