This module contains Char-specific Parsers.
Parse an exact character match.
parse (char 'a') "a" ==
(Done 'a', { input = "", position = 1 })
parse (char 'a') "b" ==
(Fail ["expected 'a'"], { input = "b", position = 0 })Parse any character.
parse anyChar "a" ==
(Done 'a', { input = "", position = 1 })
parse anyChar "" ==
(Fail ["expected any character"], { input = "", position = 0 })Parse a character from the given list.
parse (oneOf ['a', 'b']) "a" ==
(Done 'a', { input = "", position = 1 })
parse (oneOf ['a', 'b']) "c" ==
(Fail ["expected one of ['a','b']"], { input = "c", position = 0 })Parse a character from the given list.
parse (noneOf ['a', 'b']) "c" ==
(Done 'c', { input = "", position = 1 })
parse (noneOf ['a', 'b']) "a" ==
(Fail ["expected none of ['a','b']"], { input = "a", position = 0 })Parse a space character.
Parses a \t character.
Parse a \n character.
Parse a \r\n sequence. Returns a \n character.
Parses an end of line character or sequence. Returns a \n character.
Parses any lowercase character.
Parses any uppercase character.
Parses any base 10 digit.
Parses any base 8 digit.
Parses any base 16 digit.
Parse a character matching the predicate.