Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines utility operations on Haskell names such as checking if a given identifier is a correct name for a certain kind of Haskell construct.
Synopsis
- data NameClass
- classifyName :: RefactorMonad m => Name -> m NameClass
- validModuleName :: String -> Maybe String
- nameValid :: NameClass -> String -> Maybe String
- isIdChar :: Char -> Bool
- isOperatorChar :: Char -> Bool
Documentation
Different classes of definitions that have different kind of names.
Variable | Normal value definitions: functions, variables |
Ctor | Data constructors |
ValueOperator | Functions with operator-like names |
DataCtorOperator | Constructors with operator-like names |
SynonymOperator | UType definitions with operator-like names |
classifyName :: RefactorMonad m => Name -> m NameClass Source #
Get which category does a given name belong to
nameValid :: NameClass -> String -> Maybe String Source #
Check if a given name is valid for a given kind of definition
isOperatorChar :: Char -> Bool Source #