ghcide-1.6.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 #