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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulehaskell-lexer-1.2.1Haskell2010

Language.Haskell.Lexer

Synopsis
datadata Token

Haskell token classifications:

Constructors

Instances3Eq, Ord, Show
  • Eq TokenDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Tokens
  • Ord TokenDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Tokens
  • Show TokenDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Tokens

Tokenize and add position information. Preserves white space, and does not insert extra tokens due to layout.

The function lexerPass1 handles the part of lexical analysis that can be done independently of the parser---the tokenization and the addition of the extra layout tokens <n> and {n}, as specified in section 9.3 of the revised Haskell 98 Report.

valuelayoutPre :: [PosToken] -> [PosToken]

This is an implementation of Haskell layout, as specified in section 9.3 of the revised Haskell 98 report. This preprocessor inserts the extra <n> and {n} tokens.

datadata Pos

The posisiotn within a file.

Constructors

Instances3Eq, Ord, Show
  • Eq PosDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Position
  • Ord PosDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Position
  • Show PosDefined in haskell-lexer-1.2.1 · Language.Haskell.Lexer.Position