ghcide-0.5.0: 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

Instances details
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

Binary 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.5.0-44qfEMOy50OD1DtXc48AUP" '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

Instances details
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

Binary 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.5.0-44qfEMOy50OD1DtXc48AUP" '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

Instances details
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.5.0-44qfEMOy50OD1DtXc48AUP" 'False) (C1 ('MetaCons "TransitiveDependencies" 'PrefixI 'True) (S1 ('MetaSel ('Just "transitiveModuleDeps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [NormalizedFilePath]) :*: (S1 ('MetaSel ('Just "transitiveNamedModuleDeps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [NamedModuleDep]) :*: S1 ('MetaSel ('Just "transitivePkgDeps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [InstalledUnitId]))))

newtype Priority Source #

Constructors

Priority Double 

data GhcSessionIO Source #

Constructors

GhcSessionIO 

Instances

Instances details
Eq GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

Show GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

Generic GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

Associated Types

type Rep GhcSessionIO :: Type -> Type #

Hashable GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

Binary GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

NFData GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

Methods

rnf :: GhcSessionIO -> () #

type Rep GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

type Rep GhcSessionIO = D1 ('MetaData "GhcSessionIO" "Development.IDE.Core.Rules" "ghcide-0.5.0-44qfEMOy50OD1DtXc48AUP" 'False) (C1 ('MetaCons "GhcSessionIO" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.Rules

data GetClientSettings Source #

Get the vscode client settings stored in the ide state

Constructors

GetClientSettings 

Instances

Instances details
Eq GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Show GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Generic GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetClientSettings :: Type -> Type #

Hashable GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Binary GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetClientSettings -> () #

type Rep GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetClientSettings = D1 ('MetaData "GetClientSettings" "Development.IDE.Core.RuleTypes" "ghcide-0.5.0-44qfEMOy50OD1DtXc48AUP" 'False) (C1 ('MetaCons "GetClientSettings" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

useE :: IdeRule k v => k -> NormalizedFilePath -> MaybeT IdeAction (v, PositionMapping) 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

getAtPoint :: NormalizedFilePath -> Position -> IdeAction (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.