HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

Modulemegaparsec-9.8.3Haskell2010

Text.Megaparsec.State

Definition of Megaparsec's State.

Synopsis
  • 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.