ghc-9.4.4: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Utils.Lexeme

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.

okVarOcc :: String -> Bool Source #

Is this an acceptable variable name?

okConOcc :: String -> Bool Source #

Is this an acceptable constructor name?

okTcOcc :: String -> Bool Source #

Is this an acceptable type name?

okVarIdOcc :: String -> Bool Source #

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

okVarSymOcc :: String -> Bool Source #

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

okConIdOcc :: String -> Bool Source #

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

okConSymOcc :: String -> Bool Source #

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