oneOf cs succeeds if the current character is in the supplied
list of characters cs. Returns the parsed character. See also
satisfy.
vowel = oneOf "aeiou":: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleparsec-3.1.18.0Haskell2010
Commonly used character parsers.
oneOf cs succeeds if the current character is in the supplied
list of characters cs. Returns the parsed character. See also
satisfy.
vowel = oneOf "aeiou"As the dual of oneOf, noneOf cs succeeds if the current
character not in the supplied list of characters cs. Returns the
parsed character.
consonant = noneOf "aeiou"Skips zero or more white space characters. See also skipMany.
Parses a white space character (any character which satisfies isSpace) Returns the parsed character.
Parses a newline character ('\n'). Returns a newline character.
Parses a carriage return character ('\r') followed by a newline character ('\n'). Returns a newline character.
Parses a tab character ('\t'). Returns a tab character.
Parses an upper case letter (according to isUpper). Returns the parsed character.
Parses a lower case character (according to isLower). Returns the parsed character.
Parses a alphabetic or numeric Unicode characters according to isAlphaNum. Returns the parsed character.
Note that numeric digits outside the ASCII range (such as arabic-indic digits like e.g. "٤" or U+0664),
as well as numeric characters which aren't digits, are parsed by this function
but not by digit.
Parses an alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters according to isAlpha). Returns the parsed character.
Parses an ASCII digit. Returns the parsed character.
Parses a hexadecimal digit (a digit or a letter between 'a' and 'f' or 'A' and 'F'). Returns the parsed character.
Parses an octal digit (a character between '0' and '7'). Returns the parsed character.
char c parses a single character c. Returns the parsed
character (i.e. c).
semiColon = char ';'This parser succeeds for any character. Returns the parsed character.
The parser satisfy f succeeds for any character for which the
supplied function f returns True. Returns the character that is
actually parsed.
string' s parses a sequence of characters given by s.
Doesn't consume matching prefix.
carOrCdr = string' "car"
<|> string' "cdr"