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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

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?