ghcide-0.0.3: The core of an IDE

Safe HaskellNone
LanguageHaskell2010

Development.IDE.Core.Rules

Description

A Shake implementation of the compiler service, built using the Shaker abstraction layer for in-memory use.

Synopsis

Documentation

data IdeState Source #

A Shake database plus persistent store. Can be thought of as storing mappings from (FilePath, k) to RuleResult k.

data GetDependencies Source #

Constructors

GetDependencies 
Instances
Eq GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Show GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Generic GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetDependencies :: Type -> Type #

Hashable GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetDependencies -> () #

type Rep GetDependencies Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetDependencies = D1 (MetaData "GetDependencies" "Development.IDE.Core.RuleTypes" "ghcide-0.0.3-4hQ7gXQnpQHCP16DwYNMGA" False) (C1 (MetaCons "GetDependencies" PrefixI False) (U1 :: Type -> Type))
type RuleResult GetDependencies Source #

Transitive module and pkg dependencies based on the information produced by GetDependencyInformation. This rule is also responsible for calling ReportImportCycles for each file in the transitive closure.

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetParsedModule Source #

Constructors

GetParsedModule 
Instances
Eq GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Show GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Generic GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetParsedModule :: Type -> Type #

Hashable GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetParsedModule -> () #

type Rep GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetParsedModule = D1 (MetaData "GetParsedModule" "Development.IDE.Core.RuleTypes" "ghcide-0.0.3-4hQ7gXQnpQHCP16DwYNMGA" False) (C1 (MetaCons "GetParsedModule" PrefixI False) (U1 :: Type -> Type))
type RuleResult GetParsedModule Source #

The parse tree for the file using GetFileContents

Instance details

Defined in Development.IDE.Core.RuleTypes

data TransitiveDependencies Source #

Constructors

TransitiveDependencies 

Fields

Instances
Eq TransitiveDependencies Source # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Show TransitiveDependencies Source # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Generic TransitiveDependencies Source # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep TransitiveDependencies :: Type -> Type #

NFData TransitiveDependencies Source # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: TransitiveDependencies -> () #

type Rep TransitiveDependencies Source # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep TransitiveDependencies = D1 (MetaData "TransitiveDependencies" "Development.IDE.Import.DependencyInformation" "ghcide-0.0.3-4hQ7gXQnpQHCP16DwYNMGA" False) (C1 (MetaCons "TransitiveDependencies" PrefixI True) (S1 (MetaSel (Just "transitiveModuleDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [NormalizedFilePath]) :*: S1 (MetaSel (Just "transitivePkgDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [InstalledUnitId])))

newtype Priority Source #

Constructors

Priority Double 

useE :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action v Source #

useE is useful to implement functions that aren’t rules but need shortcircuiting e.g. getDefinition.

toIdeResult :: Either [FileDiagnostic] v -> IdeResult v Source #

This is useful for rules to convert rules that can only produce errors or a result into the more general IdeResult type that supports producing warnings while also producing a result.

defineNoFile :: IdeRule k v => (k -> Action v) -> Rules () Source #

mainRule :: Rules () Source #

A rule that wires per-file rules together

getGhcCore :: NormalizedFilePath -> Action (Maybe [CoreModule]) Source #

Generate the GHC Core for the supplied file and its dependencies.

getAtPoint :: NormalizedFilePath -> Position -> Action (Maybe (Maybe Range, [Text])) Source #

Try to get hover text for the name under point.

getDependencies :: NormalizedFilePath -> Action (Maybe [NormalizedFilePath]) Source #

Get all transitive file dependencies of a given module. Does not include the file itself.

getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule) Source #

Parse the contents of a daml file.

writeIfacesAndHie :: NormalizedFilePath -> [NormalizedFilePath] -> Action (Maybe [NormalizedFilePath]) Source #

Write interface files and hie files to the location specified by the given options.