Safe Haskell | None |
---|---|
Language | Haskell2010 |
Simplified interface to the GHC API.
- class Compile a
- type StgModule = CompiledModule [StgBinding]
- module CoreSyn
- module StgSyn
- module Module
- module Id
- module IdInfo
- module Var
- module Literal
- module DataCon
- module OccName
- module Name
- module Type
- module TysPrim
- module TyCon
- module ForeignCall
- module PrimOp
- module DynFlags
- module SrcLoc
- data ModSummary :: * = ModSummary {}
- data ModGuts :: * = ModGuts {
- mg_module :: !Module
- mg_boot :: IsBootInterface
- mg_exports :: ![AvailInfo]
- mg_deps :: !Dependencies
- mg_dir_imps :: !ImportedMods
- mg_used_names :: !NameSet
- mg_used_th :: !Bool
- mg_rdr_env :: !GlobalRdrEnv
- mg_fix_env :: !FixityEnv
- mg_tcs :: ![TyCon]
- mg_insts :: ![ClsInst]
- mg_fam_insts :: ![FamInst]
- mg_patsyns :: ![PatSyn]
- mg_rules :: ![CoreRule]
- mg_binds :: !CoreProgram
- mg_foreign :: !ForeignStubs
- mg_warns :: !Warnings
- mg_anns :: [Annotation]
- mg_hpc_info :: !HpcInfo
- mg_modBreaks :: !ModBreaks
- mg_vect_decls :: ![CoreVect]
- mg_vect_info :: !VectInfo
- mg_inst_env :: InstEnv
- mg_fam_inst_env :: FamInstEnv
- mg_safe_haskell :: SafeHaskellMode
- mg_trust_pkg :: Bool
- mg_dependent_files :: [FilePath]
- type PkgKey = PackageId
- pkgKeyString :: PkgKey -> String
- modulePkgKey :: Module -> PkgKey
- compile :: Compile a => [String] -> IO (CompResult a)
- compileWith :: Compile a => CompConfig -> [String] -> IO (CompResult a)
- genericCompile :: (DynFlags -> ModSummary -> Ghc a) -> CompConfig -> [String] -> IO (CompResult a)
Documentation
Any type we can generate intermediate code for.
type StgModule = CompiledModule [StgBinding] Source
module CoreSyn
module StgSyn
module Module
module Id
module IdInfo
module Var
module Literal
module DataCon
module OccName
module Name
module Type
module TysPrim
module TyCon
module ForeignCall
module PrimOp
module DynFlags
module SrcLoc
data ModSummary :: *
A single node in a 'ModuleGraph. The nodes of the module graph are one of:
- A regular Haskell source module
- A hi-boot source module
- An external-core source module
ModSummary | |
|
data ModGuts :: *
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface
and
ModDetails
are extracted and the ModGuts is discarded.
ModGuts | |
|
type PkgKey = PackageId Source
Synonym for PackageId
, to bridge a slight incompatibility between
GHC 7.8 and 7.10.
pkgKeyString :: PkgKey -> String Source
String representation of a package ID/key.
modulePkgKey :: Module -> PkgKey Source
Package ID/key of a module.
:: Compile a | |
=> [String] | List of compilation targets. A target can be either a module or a file name. |
-> IO (CompResult a) |
Compile a list of targets and their dependencies into intermediate code.
Uses settings from the the default CompConfig
.
:: Compile a | |
=> CompConfig | GHC pipeline configuration. |
-> [String] | List of compilation targets. A target can be either a module
or a file name. Targets may also be read from the specified
|
-> IO (CompResult a) |
Compile a list of targets and their dependencies using a custom configuration.
:: (DynFlags -> ModSummary -> Ghc a) | Compilation function. |
-> CompConfig | GHC pipeline configuration. |
-> [String] | List of compilation targets. A target can be either a module
or a file name. Targets may also be read from the specified
|
-> IO (CompResult a) |
Compile a list of targets and their dependencies using a custom
configuration and compilation function in the Ghc
monad. See
Language.Haskell.GHC.Simple.Impl for more information about building
custom compilation functions.