purescript-0.8.5.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.Names

Description

Data types for names

Synopsis

Documentation

data Ident Source

Names for value identifiers

Constructors

Ident String

An alphanumeric identifier

Op String

A symbolic name for an infix operator

GenIdent (Maybe String) Integer

A generated name for an identifier

newtype ProperName a Source

Proper names, i.e. capitalized names for e.g. module names, type//data constructors.

Constructors

ProperName 

data ProperNameType Source

The closed set of proper name types.

coerceProperName :: ProperName a -> ProperName b Source

Coerces a ProperName from one ProperNameType to another. This should be used with care, and is primarily used to convert ClassNames into TypeNames after classes have been desugared.

data Qualified a Source

A qualified name, i.e. a name with an optional module name

Constructors

Qualified (Maybe ModuleName) a 

qualify :: ModuleName -> Qualified a -> (ModuleName, a) Source

Provide a default module name, if a name is unqualified

mkQualified :: a -> ModuleName -> Qualified a Source

Makes a qualified value from a name and module name.

disqualify :: Qualified a -> a Source

Remove the module name from a qualified name

isQualified :: Qualified a -> Bool Source

Checks whether a qualified value is actually qualified with a module reference

isUnqualified :: Qualified a -> Bool Source

Checks whether a qualified value is not actually qualified with a module reference

isQualifiedWith :: ModuleName -> Qualified a -> Bool Source

Checks whether a qualified value is qualified with a particular module