ghc-7.0.3: The GHC API

DriverPipeline

Synopsis

Documentation

oneShot :: GhcMonad m => HscEnv -> Phase -> [(String, Maybe Phase)] -> m ()Source

preprocessSource

Arguments

:: GhcMonad m 
=> HscEnv 
-> (FilePath, Maybe Phase)

filename and starting phase

-> m (DynFlags, FilePath) 

Just preprocess a file, put the result in a temp. file (used by the compilation manager during the summary phase).

We return the augmented DynFlags, because they contain the result of slurping in the OPTIONS pragmas

compileSource

Arguments

:: GhcMonad m 
=> HscEnv 
-> ModSummary

summary for module being compiled

-> Int

module N ...

-> Int

... of M

-> Maybe ModIface

old interface, if we have one

-> Maybe Linkable

old linkable, if we have one

-> m HomeModInfo

the complete HomeModInfo, if successful

Compile

Compile a single module, under the control of the compilation manager.

This is the interface between the compilation manager and the compiler proper (hsc), where we deal with tedious details like reading the OPTIONS pragma from the source file, and passing the output of hsc through the C compiler.

NB. No old interface can also mean that the source has changed.

compile'Source

Arguments

:: GhcMonad m 
=> (Compiler m (HscStatus, ModIface, ModDetails), Compiler m (InteractiveStatus, ModIface, ModDetails), Compiler m (HscStatus, ModIface, ModDetails)) 
-> HscEnv 
-> ModSummary

summary for module being compiled

-> Int

module N ...

-> Int

... of M

-> Maybe ModIface

old interface, if we have one

-> Maybe Linkable

old linkable, if we have one

-> m HomeModInfo

the complete HomeModInfo, if successful