Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- isLexCon :: FastString -> Bool
- isLexVar :: FastString -> Bool
- isLexId :: FastString -> Bool
- isLexSym :: FastString -> Bool
- isLexConId :: FastString -> Bool
- isLexConSym :: FastString -> Bool
- isLexVarId :: FastString -> Bool
- isLexVarSym :: FastString -> Bool
- startsVarSym :: Char -> Bool
- startsVarId :: Char -> Bool
- startsConSym :: Char -> Bool
- startsConId :: Char -> Bool
- okVarOcc :: String -> Bool
- okConOcc :: String -> Bool
- okTcOcc :: String -> Bool
- okVarIdOcc :: String -> Bool
- okVarSymOcc :: String -> Bool
- okConIdOcc :: String -> Bool
- okConSymOcc :: String -> Bool
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.
isLexCon :: FastString -> Bool Source #
isLexVar :: FastString -> Bool Source #
isLexId :: FastString -> Bool Source #
isLexSym :: FastString -> Bool Source #
isLexConId :: FastString -> Bool Source #
isLexConSym :: FastString -> Bool Source #
isLexVarId :: FastString -> Bool Source #
isLexVarSym :: FastString -> Bool Source #
startsVarSym :: Char -> Bool #
startsVarId :: Char -> Bool #
startsConSym :: Char -> Bool #
startsConId :: Char -> Bool #
Validating identifiers
These functions (working over plain old String
s) check
to make sure that the identifier is valid.
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?