ghc-7.6.3: The GHC API

Safe HaskellNone

DriverPipeline

Synopsis

Documentation

preprocessSource

Arguments

:: HscEnv 
-> (FilePath, Maybe Phase)

filename and starting phase

-> IO (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

:: 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

-> SourceModified 
-> IO 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, converting the C or assembly that GHC produces into an object file, and compiling FFI stub files.

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

compile'Source

Arguments

:: (Compiler (HscStatus, ModIface, ModDetails), Compiler (InteractiveStatus, ModIface, ModDetails), Compiler (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

-> SourceModified 
-> IO HomeModInfo

the complete HomeModInfo, if successful