purescript-0.8.5.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.Externs

Description

This module generates code for "externs" files, i.e. files containing only foreign import declarations.

Synopsis

Documentation

data ExternsFile Source

The data which will be serialized to an externs file

Constructors

ExternsFile 

Fields

efVersion :: String

The externs version

efModuleName :: ModuleName

Module name

efExports :: [DeclarationRef]

List of module exports

efImports :: [ExternsImport]

List of module imports

efFixities :: [ExternsFixity]

List of operators and their fixities

efDeclarations :: [ExternsDeclaration]

List of type and value declaration

data ExternsImport Source

A module import in an externs file

Constructors

ExternsImport 

Fields

eiModule :: ModuleName

The imported module

eiImportType :: ImportDeclarationType

The import type: regular, qualified or hiding

eiImportedAs :: Maybe ModuleName

The imported-as name, for qualified imports

data ExternsFixity Source

A fixity declaration in an externs file

Constructors

ExternsFixity 

Fields

efAssociativity :: Associativity

The associativity of the operator

efPrecedence :: Precedence

The precedence level of the operator

efOperator :: String

The operator symbol

efAlias :: Maybe (Qualified FixityAlias)

The value the operator is an alias for

moduleToExternsFile :: Module -> Environment -> ExternsFile Source

Generate an externs file for all declarations in a module

applyExternsFileToEnvironment :: ExternsFile -> Environment -> Environment Source

Convert an externs file back into a module