Safe Haskell | None |
---|---|
Language | Haskell2010 |
A Shake implementation of the compiler service, built using the Shaker abstraction layer for in-memory use.
Synopsis
- data IdeState
- data GetDependencies = GetDependencies
- data GetParsedModule = GetParsedModule
- data TransitiveDependencies = TransitiveDependencies {}
- newtype Priority = Priority Double
- priorityTypeCheck :: Priority
- priorityGenerateCore :: Priority
- priorityFilesOfInterest :: Priority
- runAction :: IdeState -> Action a -> IO a
- useE :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action v
- useNoFileE :: IdeRule k v => k -> MaybeT Action v
- usesE :: IdeRule k v => k -> [NormalizedFilePath] -> MaybeT Action [v]
- toIdeResult :: Either [FileDiagnostic] v -> IdeResult v
- defineNoFile :: IdeRule k v => (k -> Action v) -> Rules ()
- mainRule :: Rules ()
- getGhcCore :: NormalizedFilePath -> Action (Maybe [CoreModule])
- getAtPoint :: NormalizedFilePath -> Position -> Action (Maybe (Maybe Range, [Text]))
- getDefinition :: NormalizedFilePath -> Position -> Action (Maybe Location)
- getDependencies :: NormalizedFilePath -> Action (Maybe [NormalizedFilePath])
- getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule)
- fileFromParsedModule :: ParsedModule -> NormalizedFilePath
Documentation
A Shake database plus persistent store. Can be thought of as storing
mappings from (FilePath, k)
to RuleResult k
.
data GetDependencies Source #
Instances
data GetParsedModule Source #
Instances
data TransitiveDependencies Source #
TransitiveDependencies | |
|
Instances
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.
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.
getDefinition :: NormalizedFilePath -> Position -> Action (Maybe Location) Source #
Goto Definition.
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.