HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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 declarations
valuecrlf :: (MonadParsec e s m, Token s ~ Word8) => m (Tokens s)
#

Parse a carriage return character followed by a newline character. Return the sequence of characters parsed.

Categories of characters

12 declarations
valuespaceChar :: (MonadParsec e s m, Token s ~ Word8) => m (Token s)
#

Parse a space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab.

valueasciiChar :: (MonadParsec e s m, Token s ~ Word8) => m (Token s)
#

Parse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set.

Single byte

2 declarations
valuechar' :: (MonadParsec e s m, Token s ~ Word8) => Token s -> m (Token s)
#

The same as char but case-insensitive. This parser returns the actually parsed character preserving its case.

Example2 expressions
parseTest (char' 101) "E"69 -- 'E'parseTest (char' 101) "G"1:1:unexpected 'G'expecting 'E' or 'e'

Sequence of bytes

2 declarations