ghc-7.0.1: The GHC API

HscMain

Description

Main driver for the compiling plain Haskell source code.

This module implements compilation of a Haskell-only source file. It is not concerned with preprocessing of source files; this is handled in DriverPipeline.

Synopsis

Documentation

hscGenHardCodeSource

Arguments

:: GhcMonad m 
=> CgGuts 
-> ModSummary 
-> m Bool

True = stub.c exists

Compile to hard-code.

hscStmtSource

Arguments

:: GhcMonad m 
=> HscEnv 
-> String 
-> m (Maybe ([Id], HValue))

Nothing == empty statement (or comment only), but no parse error

hscKcTypeSource

Arguments

:: GhcMonad m 
=> HscEnv 
-> String

The type

-> m Kind 

Find the kind of a type

data HsCompiler a Source

Constructors

HsCompiler 

Fields

hscNoRecomp :: GhcMonad m => ModIface -> m a

Called when no recompilation is necessary.

hscRecompile :: GhcMonad m => ModSummary -> Maybe Fingerprint -> m a

Called to recompile the module.

hscBackend :: GhcMonad m => TcGblEnv -> ModSummary -> Maybe Fingerprint -> m a
 
hscGenBootOutput :: GhcMonad m => TcGblEnv -> ModSummary -> Maybe Fingerprint -> m a

Code generation for Boot modules.

hscGenOutput :: GhcMonad m => ModGuts -> ModSummary -> Maybe Fingerprint -> m a

Code generation for normal modules.

hscCompileOneShot :: Compiler OneShotResultSource

data HscStatus' a Source

Constructors

HscNoRecomp 
HscRecomp Bool a 

hscParse :: GhcMonad m => ModSummary -> m (Located (HsModule RdrName))Source

parse a file, returning the abstract syntax

hscTypecheck :: GhcMonad m => ModSummary -> Located (HsModule RdrName) -> m TcGblEnvSource

Rename and typecheck a module

hscTypecheckRename :: GhcMonad m => ModSummary -> Located (HsModule RdrName) -> m (TcGblEnv, RenamedStuff)Source

Rename and typecheck a module, additionally returning the renamed syntax

hscDesugar :: GhcMonad m => ModSummary -> TcGblEnv -> m ModGutsSource

Convert a typechecked module to Core

makeSimpleIface :: GhcMonad m => Maybe ModIface -> TcGblEnv -> ModDetails -> m (ModIface, Bool)Source

Make a ModIface from the results of typechecking. Used when not optimising, and the interface doesn't need to contain any unfoldings or other cross-module optimisation info. ToDo: the old interface is only needed to get the version numbers, we should use fingerprint versions instead.

makeSimpleDetails :: GhcMonad m => TcGblEnv -> m ModDetailsSource

Make a ModDetails from the results of typechecking. Used when typechecking only, as opposed to full compilation.