ghcide-1.7.0.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.GHC.Compat

Description

Attempt at hiding the GHC version differences we can.

Synopsis

Documentation

newtype NameCacheUpdater #

A function that atomically updates the name cache given a modifier function. The second result of the modifier function will be the result of the IO action.

Constructors

NCU 

Fields

HIE Compat

data HieFile #

GHC builds up a wealth of information about Haskell source as it compiles it. .hie files are a way of persisting some of this information to disk so that external tools that need to work with haskell source don't need to parse, typecheck, and rename all over again. These files contain:

  • a simplified AST

    • nodes are annotated with source positions and types
    • identifiers are annotated with scope information
  • the raw bytes of the initial Haskell source

Besides saving compilation cycles, .hie files also offer a more stable interface than the GHC API.

Constructors

HieFile 

Fields

Instances

Instances details
Show HieFile Source # 
Instance details

Defined in Development.IDE.GHC.Orphans

NFData HieFile Source # 
Instance details

Defined in Development.IDE.GHC.Orphans

Methods

rnf :: HieFile -> () #

Binary HieFile 
Instance details

Defined in HieTypes

enrichHie :: TypecheckedSource -> RenamedSource -> Hsc (HieASTs Type) #

writeHieFile :: FilePath -> HieFile -> IO () #

Write a HieFile to the given FilePath, with a proper header and symbol tables for Names and FastStrings

readHieFile :: NameCacheUpdater -> FilePath -> IO HieFileResult #

Read a HieFile from a FilePath. Can use an existing NameCache.

Compat modules

Extras that rely on compat modules

SysTools

data Option #

When invoking external tools as part of the compilation pipeline, we pass these a sequence of options on the command-line. Rather than just using a list of Strings, we use a type that allows us to distinguish between filepaths and 'other stuff'. The reason for this is that this type gives us a handle on transforming filenames, and filenames only, to whatever format they're expected to be on a particular platform.

Instances

Instances details
Eq Option 
Instance details

Defined in CliOption

Methods

(==) :: Option -> Option -> Bool #

(/=) :: Option -> Option -> Bool #

runPp :: Logger -> DynFlags -> [Option] -> IO () Source #

Recompilation avoidance

type CoreExpr = Expr CoreBndr #

Expressions where binders are CoreBndrs

type HomePackageTable = DModuleNameEnv HomeModInfo #

Helps us find information about modules in the home package

data Dependencies #

Dependency information about ALL modules and packages below this one in the import hierarchy.

Invariant: the dependencies of a module M never includes M.

Invariant: none of the lists contain duplicates.

Instances

Instances details
Eq Dependencies 
Instance details

Defined in HscTypes

Binary Dependencies 
Instance details

Defined in HscTypes

bcoFreeNames :: UnlinkedBCO -> UniqDSet Name #

Finds external references. Remember to remove the names defined by this group of BCOs themselves

data AnnTarget name #

An annotation target

Constructors

ModuleTarget Module

We are annotating a particular module

Instances

Instances details
Functor AnnTarget 
Instance details

Defined in Annotations

Methods

fmap :: (a -> b) -> AnnTarget a -> AnnTarget b #

(<$) :: a -> AnnTarget b -> AnnTarget a #

Binary name => Binary (AnnTarget name) 
Instance details

Defined in Annotations

Methods

put_ :: BinHandle -> AnnTarget name -> IO () #

put :: BinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) #

get :: BinHandle -> IO (AnnTarget name) #

Uniquable name => Uniquable (AnnTarget name) 
Instance details

Defined in Annotations

Methods

getUnique :: AnnTarget name -> Unique #

Outputable name => Outputable (AnnTarget name) 
Instance details

Defined in Annotations

Methods

ppr :: AnnTarget name -> SDoc #

pprPrec :: Rational -> AnnTarget name -> SDoc #

extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv #

Add the given annotation to the environment.

module UniqDSet

module UniqSet

module UniqDFM

linkExpr :: HscEnv -> SrcSpan -> UnlinkedBCO -> IO ForeignHValue #

Link a single expression, including first linking packages and modules that this expression depends on.

Raises an IO exception (ProgramError) if it can't find a compiled version of the dependents to link.