Safe Haskell | None |
---|
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.
- 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
- parseImportDecl :: GhcMonad m => String -> m (ImportDecl RdrName)
- typeKind :: GhcMonad m => String -> m Kind
- setContext :: GhcMonad m => [ImportDecl RdrName] -> m ()
- defaultErrorHandler :: (MonadIO m, ExceptionMonad m) => m a -> m a
- showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String
- setLogAction :: GhcMonad m => LogAction -> m ()
- showSDoc :: DynFlags -> SDoc -> String
- getInfo :: GhcMonad m => Name -> m (Maybe (TyThing, Fixity, [SomeInstance]))
- addToContext :: GhcMonad m => ImportDecl RdrName -> m ()
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
parseImportDecl :: GhcMonad m => String -> m (ImportDecl RdrName)Source
Wraps parseImportDecl
.
setContext :: GhcMonad m => [ImportDecl RdrName] -> m ()Source
Wraps setContext
.
defaultErrorHandler :: (MonadIO m, ExceptionMonad m) => m a -> m aSource
Wraps defaultErrorHandler
.
showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> StringSource
Wraps showSDocForUser
.
setLogAction :: GhcMonad m => LogAction -> m ()Source
Sets the log action for the session.
addToContext :: GhcMonad m => ImportDecl RdrName -> m ()Source
Add an import declaration to the context with setContext
.