haskell-tools-refactor-1.1.0.1: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.Utils.Name

Description

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

Documentation

data NameClass Source #

Different classes of definitions that have different kind of names.

Constructors

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

validModuleName :: String -> Maybe String Source #

Checks if a given name is a valid module name

nameValid :: NameClass -> String -> Maybe String Source #

Check if a given name is valid for a given kind of definition