ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Copyright | (c) The GHC Team
Maintainer | ghc-devs@haskell.org
Portability | portable
Safe Haskell | Ignore
Language | GHC2021

GHC.Lexeme

Contents

- Lexical characteristics of Haskell names

Description

Functions to evaluate whether or not a string is a valid identifier.

Synopsis

- startsVarSym :: Char -> Bool
- startsVarId :: Char -> Bool
- startsConSym :: Char -> Bool
- startsConId :: Char -> Bool
- startsVarSymASCII :: Char -> Bool
- isVarSymChar :: Char -> Bool
- okSymChar :: Char -> Bool

# Lexical characteristics of Haskell names

startsVarSym :: Char -> Bool Source #

startsVarId :: Char -> Bool Source #

startsConSym :: Char -> Bool Source #

startsConId :: Char -> Bool Source #

startsVarSymASCII :: Char -> Bool Source #

isVarSymChar :: Char -> Bool Source #

okSymChar :: Char -> Bool Source #

Is this character acceptable in a symbol (after the first char)? See alexGetByte in GHC.Parser.Lexer