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-lib-parser-9.14.1.20251220GHC2021

GHC.Utils.Lexeme

Contents
  1. Lexical characteristics of Haskell names
  2. Validating identifiers
Synopsis

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?