HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Moduleparsec-3.1.18.0Haskell2010

Text.Parsec.Char

Commonly used character parsers.

Synopsis
  • Packageparsec-3.1.18.0
  • Exports20
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceChar.hs
valueoneOf :: Stream s m Char => [Char] -> ParsecT s u m Char

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"
valuenoneOf :: Stream s m Char => [Char] -> ParsecT s u m Char

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"
valuecrlf :: Stream s m Char => ParsecT s u m Char

Parses a carriage return character ('\r') followed by a newline character ('\n'). Returns a newline character.

valuealphaNum :: Stream s m Char => ParsecT s u m Char

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.

valueletter :: Stream s m Char => ParsecT s u m Char

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.

valuehexDigit :: Stream s m Char => ParsecT s u m Char

Parses a hexadecimal digit (a digit or a letter between 'a' and 'f' or 'A' and 'F'). Returns the parsed character.