uhc-light-1.1.8.2: Part of UHC packaged as cabal/hackage installable library

Safe HaskellNone
LanguageHaskell98

UHC.Light.Compiler.Base.API

Contents

Description

Base Public API (provisional, to be refactored)

Synopsis

Opts

Options to the compiler.

data EHCOpts Source

The options to use.

defaultEHCOpts :: EHCOpts Source

The default EHC options.

Names

Names in UHC have to be of the form P1.P2....Pn.Ident . All names in module M must have the form M.Ident . Datatype and constructor names have to start with an uppercase letter, functions with a lowercase letter.

mkUniqueHsName Source

Arguments

:: String

Name prefix. Used to distinguish names generated by different API consumers, but may also be used to differentiate between different varieties by one API consumer. Use reverse-dns notation if possible, e.g. "nl.uu.agda.identOfVarietyA"

-> [String]

The module prefix.

-> String

The name to make unique.

-> HsName 

Creates a new Core name. All names generated with this function live in the "Core API" namespace and will not collide with names in other namespaces. Names in the "Core API" namespace cannot be called from Haskell code.

Use this function to create names used only inside Core code generated by your own Compiler, e.g. module-scoped or local functions.

addHsNamePrefix :: String -> HsName -> HsName Source

Adds an additional prefix to a HsName. This can be used to derive a new unique name from an existing name.

mkHsName Source

Arguments

:: [String]

The module prefix.

-> String

The local name of the identifier.

-> HsName 

Creates a new Core name. The generated name lives in the default namespace, hence may clash with Haskell-defined names.

mkHsName1 :: String -> HsName Source

Creates a new Core name. The generated name lives in the default namespace, hence may clash with Haskell-defined names.

Constructor Tags

Names

data HsName Source

Haskell name representation, exports of constructors only intented for internal use

Error

Misc