ghc-server-1.1: A server interface to GHC.

Safe HaskellNone

GHC.Compat

Description

Compatibility layer for GHC. Supports GHC 7.4, 7.6, 7.8.

None of the ghc-server project should import from the GHC API directly, it should import via this layer. It exports everything from the GHC API that is needed. Ideally, only this module will use CPP, too.

Some symbols are not exported, usurped by compatible re-definitions. These compatibility wrappers are added on a case-by-case basis. Otherwise, everything is re-exported.

Each function has a type signature. Under each type signature lies an implementation dependent upon a specific major GHC version. When a new GHC version is added to the test builds, a new #if section will needed to be added for that specific version. If not, there will be a build error. This helps to ensure specific versions are dealt with.

Synopsis

Documentation

module GHC

module GHC.Paths

module Outputable

module Packages

module BasicTypes

module DynFlags

module GhcMonad

module SrcLoc

module FastString

module MonadUtils

module Exception

module HscTypes

setLogAction :: GhcMonad m => LogAction -> m ()Source

Sets the log action for the session.

getInfo :: GhcMonad m => Name -> m (Maybe (TyThing, Fixity, [SomeInstance]))Source

Wraps getInfo.

addToContext :: GhcMonad m => ImportDecl RdrName -> m ()Source

Add an import declaration to the context with setContext.