Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data PathCompletionInfo = PathCompletionInfo {}
- pathCompletionInfoFromCabalPrefixInfo :: FilePath -> CabalPrefixInfo -> PathCompletionInfo
- sourceDirsExtractionLibrary :: Maybe StanzaName -> GenericPackageDescription -> [FilePath]
- sourceDirsExtractionExecutable :: Maybe StanzaName -> GenericPackageDescription -> [FilePath]
- sourceDirsExtractionTestSuite :: Maybe StanzaName -> GenericPackageDescription -> [FilePath]
- sourceDirsExtractionBenchmark :: Maybe StanzaName -> GenericPackageDescription -> [FilePath]
- extractRelativeDirsFromStanza :: Maybe StanzaName -> GenericPackageDescription -> (GenericPackageDescription -> [(UnqualComponentName, CondTree b c a)]) -> (a -> BuildInfo) -> [FilePath]
Documentation
data PathCompletionInfo Source #
Information used to query and build path completions.
Note that pathSegment combined with queryDirectory results in the original prefix.
Example:
When given the written prefix, dir1/dir2/fi
, the
resulting PathCompletionInfo would be:
pathSegment = "fi" queryDirectory = "dir1/dir2/fi" ...
PathCompletionInfo | |
|
Instances
Show PathCompletionInfo Source # | |
Defined in Ide.Plugin.Cabal.Completion.Completer.Paths showsPrec :: Int -> PathCompletionInfo -> ShowS # show :: PathCompletionInfo -> String # showList :: [PathCompletionInfo] -> ShowS # | |
Eq PathCompletionInfo Source # | |
Defined in Ide.Plugin.Cabal.Completion.Completer.Paths (==) :: PathCompletionInfo -> PathCompletionInfo -> Bool # (/=) :: PathCompletionInfo -> PathCompletionInfo -> Bool # |
pathCompletionInfoFromCabalPrefixInfo :: FilePath -> CabalPrefixInfo -> PathCompletionInfo Source #
Takes an optional source subdirectory and a prefix info and creates a path completion info accordingly.
The source directory represents some subdirectory of the working directory such as a
path from the field hs-source-dirs
.
If the source subdirectory is empty, then the working directory is simply set to the currently handled cabal file's directory.
sourceDirsExtractionLibrary :: Maybe StanzaName -> GenericPackageDescription -> [FilePath] Source #
Extracts the source directories of the library stanza.
sourceDirsExtractionExecutable :: Maybe StanzaName -> GenericPackageDescription -> [FilePath] Source #
Extracts the source directories of the executable stanza with the given name.
sourceDirsExtractionTestSuite :: Maybe StanzaName -> GenericPackageDescription -> [FilePath] Source #
Extracts the source directories of the test suite stanza with the given name.
sourceDirsExtractionBenchmark :: Maybe StanzaName -> GenericPackageDescription -> [FilePath] Source #
Extracts the source directories of benchmark stanza with the given name.
extractRelativeDirsFromStanza :: Maybe StanzaName -> GenericPackageDescription -> (GenericPackageDescription -> [(UnqualComponentName, CondTree b c a)]) -> (a -> BuildInfo) -> [FilePath] Source #
Takes a possible stanza name, a GenericPackageDescription, a function to access the stanza information we are interested in and a function to access the build info from the specific stanza.
Returns a list of relative source directory paths specified for the extracted stanza.