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

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Moduleghc-9.14.1GHC2021

GHC.Utils.Lexeme

Contents
  1. Lexical characteristics of Haskell names
  2. Validating identifiers
Synopsis
  • Packageghc-9.14.1
  • Exports19
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceLexeme.hs

Lexical characteristics of Haskell names

Use these functions to figure what kind of name a FastString represents; these functions do not check that the identifier is valid.

Validating identifiers

These functions (working over plain old Strings) check to make sure that the identifier is valid.

valueokVarIdOcc :: String -> Bool

Is this an acceptable alphanumeric variable name, assuming it starts with an acceptable letter?

Is this an acceptable symbolic variable name, assuming it starts with an acceptable character?

valueokConIdOcc :: String -> Bool

Is this an acceptable alphanumeric constructor name, assuming it starts with an acceptable letter?

Is this an acceptable symbolic constructor name, assuming it starts with an acceptable character?