HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulemegaparsec-9.8.3Haskell2010

Text.Megaparsec.State

Definition of Megaparsec's State.

  • 2 types
  • 2 values
  • Packagemegaparsec-9.8.3
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceState.hs
datadata State s e
#

This is Megaparsec's state, parametrized over the stream type s and the custom error component type e.

Constructors

Instances6Eq, Data, Show, Generic, NFData, Rep
valueinitialState
  1. :: FilePath

    Name of the file the input is coming from

  2. -> s

    Input

  3. -> State s e
#

Given the name of the source file and the input, construct the initial state for a parser.

datadata PosState s
#

A special kind of state that is used to calculate line/column positions on demand.

Constructors

Instances6Eq, Data, Show, Generic, NFData, Rep
valueinitialPosState
  1. :: FilePath

    Name of the file the input is coming from

  2. -> s

    Input

  3. -> PosState s
#

Given the name of the source file and the input, construct the initial positional state.