purescript-0.15.15: PureScript Programming Language Compiler
Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Sugar.Names

Synopsis

Documentation

desugarImports :: (MonadError MultipleErrors m, MonadWriter MultipleErrors m, MonadState (Env, UsedImports) m) => Module -> m Module #

Replaces all local names with qualified names.

type Env = Map ModuleName (SourceSpan, Imports, Exports) #

The imports and exports for a collection of modules. The SourceSpan is used to store the source location of the module with a given name, used to provide useful information when there is a duplicate module definition.

externsEnv :: (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Env -> ExternsFile -> m Env #

Create an environment from a collection of externs files

primEnv :: Env #

Environment which only contains the Prim modules.

data ImportRecord a #

The details for an import: the name of the thing that is being imported (x if importing from A), the module that the thing was originally defined in (for re-export resolution), and the import provenance (see below).

Instances

Instances details
Show a => Show (ImportRecord a) # 
Instance details

Defined in Language.PureScript.Sugar.Names.Env

Eq a => Eq (ImportRecord a) # 
Instance details

Defined in Language.PureScript.Sugar.Names.Env

Ord a => Ord (ImportRecord a) # 
Instance details

Defined in Language.PureScript.Sugar.Names.Env

data ImportProvenance #

Used to track how an import was introduced into scope. This allows us to handle the one-open-import special case that allows a name conflict to become a warning rather than being an unresolvable situation.

data Imports #

The imported declarations for a module, including the module's own members.

Constructors

Imports 

Fields

Instances

Instances details
Show Imports # 
Instance details

Defined in Language.PureScript.Sugar.Names.Env

data Exports #

The exported declarations from a module.

Constructors

Exports 

Fields

Instances

Instances details
Show Exports # 
Instance details

Defined in Language.PureScript.Sugar.Names.Env