ghc-8.4.3: The GHC API

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.

Is this an acceptable variable name?

Is this an acceptable constructor name?

Is this an acceptable type name?

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?

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?