GHC

# Initialisation

defaultErrorHandler

defaultCleanupHandler

prettyPrintGhcErrors

installSignalHandlers

withCleanupSession

# GHC Monad

data Ghc a

data GhcT m a

class GhcMonad m

data HscEnv

runGhc

runGhcT

initGhcMonad

gcatch

gbracket

gfinally

printException

handleSourceError

needsTemplateHaskell

# Flags and settings

data DynFlags

data GeneralFlag

data Severity

data HscTarget

gopt

data GhcMode

data GhcLink

defaultObjectTarget

parseDynamicFlags

getSessionDynFlags

setSessionDynFlags

getProgramDynFlags

setProgramDynFlags

getInteractiveDynFlags

setInteractiveDynFlags

parseStaticFlags

# Targets

data Target

data TargetId

data Phase

setTargets

getTargets

addTarget

removeTarget

guessTarget

# Loading/compiling the program

depanal

load

data LoadHowMuch

data InteractiveImport

data SuccessFlag

succeeded

failed

defaultWarnErrLogger

type WarnErrLogger

workingDirectoryChanged

parseModule

typecheckModule

desugarModule

loadModule

data ParsedModule

data TypecheckedModule

data DesugaredModule

type TypecheckedSource

type ParsedSource

type RenamedSource

class TypecheckedMod m

class ParsedMod m

moduleInfo

renamedSource

typecheckedSource

parsedSource

coreModule

## Compiling to Core

data CoreModule

compileToCoreModule

compileToCoreSimplified

# Inspecting the module structure of the program

type ModuleGraph

data ModSummary

ms_mod_name

data ModLocation

getModSummary

getModuleGraph

isLoaded

topSortModuleGraph

# Inspecting modules

data ModuleInfo

getModuleInfo

modInfoTyThings

modInfoTopLevelScope

modInfoExports

modInfoExportsWithSelectors

modInfoInstances

modInfoIsExportedName

modInfoLookupName

modInfoIface

modInfoSafe

lookupGlobalName

findGlobalAnns

mkPrintUnqualifiedForModule

data ModIface

data SafeHaskellMode

# Querying the environment

# Printing

data PrintUnqualified

alwaysQualify

# Interactive evaluation

## Executing statements

execStmt

data ExecOptions

execOptions

data ExecResult

resumeExec

## Adding new declarations

runDecls

runDeclsWithLocation

## Get/set the current context

parseImportDecl

setContext

getContext

setGHCiMonad

getGHCiMonad

## Inspecting the current context

getBindings

getInsts

getPrintUnqual

findModule

lookupModule

isModuleTrusted

moduleTrustReqs

getNamesInScope

getRdrNamesInScope

getGRE

moduleIsInterpreted

getInfo

showModule

isModuleInterpreted

## Inspecting types and kinds

exprType

typeKind

## Looking up a Name

parseName

lookupName

## Compiling expressions

data HValue

parseExpr

compileParsedExpr

compileExpr

dynCompileExpr

type ForeignHValue

compileExprRemote

compileParsedExprRemote

## Other

runTcInteractive

isStmt

hasImport

isImport

isDecl

## The debugger

data SingleStep

data Resume

data History

getHistorySpan

getHistoryModule

abandon

abandonAll

getResumeContext

obtainTermFromId

obtainTermFromVal

reconstructType

modInfoModBreaks

data ModBreaks

type BreakIndex

data BreakInfo

back

forward

## Deprecated API

data RunResult

runStmt

runStmtWithLocation

resume

# Abstract syntax elements

## Packages

data UnitId

## Modules

data Module

mkModule

pprModule

moduleName

moduleUnitId

data ModuleName

mkModuleName

moduleNameString

## Names

data Name

isExternalName

nameModule

pprParenSymName

nameSrcSpan

class NamedThing a

data RdrName

## Identifiers

type Id

idType

isImplicitId

isDeadBinder

isExportedId

isLocalId

isGlobalId

isRecordSelector

isPrimOpId

isFCallId

isClassOpId_maybe

isDataConWorkId

idDataCon

isBottomingId

isDictonaryId

recordSelectorTyCon

## Type constructors

data TyCon

tyConTyVars

tyConDataCons

tyConArity

isClassTyCon

isTypeSynonymTyCon

isTypeFamilyTyCon

isNewTyCon

isPrimTyCon

isFunTyCon

isFamilyTyCon

isOpenFamilyTyCon

isOpenTypeFamilyTyCon

tyConClass_maybe

synTyConRhs_maybe

synTyConDefn_maybe

tyConKind

## Type variables

type TyVar

alphaTyVars

## Data constructors

data DataCon

dataConSig

dataConType

dataConTyCon

dataConFieldLabels

dataConIsInfix

isVanillaDataCon

dataConUserType

dataConSrcBangs

data StrictnessMark

isMarkedStrict

## Classes

data Class

classMethods

classSCTheta

classTvsFds

classATs

pprFundeps

## Instances

data ClsInst

instanceDFunId

pprInstance

pprInstanceHdr

pprFamInst

data FamInst

## Types and Kinds

data Type

splitForAllTys

funResultTy

pprParendType

pprTypeApp

type Kind

type PredType

type ThetaType

pprForAll

pprForAllImplicit

pprThetaArrowTy

## Entities

data TyThing

## Syntax

## Fixities

data FixityDirection

defaultFixity

maxPrecedence

negateFixity

compareFixity

## Source locations

data SrcLoc

data RealSrcLoc

mkSrcLoc

noSrcLoc

srcLocFile

srcLocLine

srcLocCol

data SrcSpan

data RealSrcSpan

mkSrcSpan

srcLocSpan

isGoodSrcSpan

noSrcSpan

srcSpanStart

srcSpanEnd

srcSpanFile

srcSpanStartLine

srcSpanEndLine

srcSpanStartCol

srcSpanEndCol

## Located

data GenLocated l e

type Located e

### Constructing Located

noLoc

mkGeneralLocated

### Deconstructing Located

getLoc

unLoc

### Combining and comparing Located values

eqLocated

cmpLocated

combineLocs

addCLoc

leftmost_smallest

leftmost_largest

rightmost

spans

isSubspanOf

# Exceptions

data GhcException

showGhcException

# Token stream manipulations

data Token

getTokenStream

getRichTokenStream

showRichTokenStream

addSourceToTokens

# Pure interface to the parser

parser

# API Annotations

type ApiAnns

data AnnKeywordId

data AnnotationComment

getAnnotation

getAndRemoveAnnotation

getAnnotationComments

getAndRemoveAnnotationComments

unicodeAnn

# Miscellaneous

cyclicModuleErr