Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
A module which exports all component-level file-gathering logic. It also includes utility functions for handling paths and directories.
Synopsis
- resolveOrWarn :: Text -> (Path Abs Dir -> String -> RIO GetPackageFileContext (Maybe a)) -> FilePath -> RIO GetPackageFileContext (Maybe a)
- componentOutputDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir
- componentBuildDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir
- packageAutogenDir :: Path Abs Dir -> Path Abs Dir
- buildDir :: Path Abs Dir -> Path Abs Dir
- componentAutogenDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir
- data ComponentFile = ComponentFile {
- moduleFileMap :: !(Map ModuleName (Path Abs File))
- otherFile :: ![DotCabalPath]
- packageWarning :: ![PackageWarning]
- stackLibraryFiles :: StackLibrary -> RIO GetPackageFileContext (NamedComponent, ComponentFile)
- stackExecutableFiles :: StackExecutable -> RIO GetPackageFileContext (NamedComponent, ComponentFile)
- stackTestSuiteFiles :: StackTestSuite -> RIO GetPackageFileContext (NamedComponent, ComponentFile)
- stackBenchmarkFiles :: StackBenchmark -> RIO GetPackageFileContext (NamedComponent, ComponentFile)
Documentation
resolveOrWarn :: Text -> (Path Abs Dir -> String -> RIO GetPackageFileContext (Maybe a)) -> FilePath -> RIO GetPackageFileContext (Maybe a) Source #
componentOutputDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir Source #
The directory where generated files are put like .o or .hs (from .x files).
componentBuildDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir Source #
packageAutogenDir :: Path Abs Dir -> Path Abs Dir Source #
Make the global autogen dir if Cabal version is new enough.
buildDir :: Path Abs Dir -> Path Abs Dir Source #
Make the build dir. Note that Cabal >= 2.0 uses the
componentBuildDir
above for some things.
componentAutogenDir :: NamedComponent -> Path Abs Dir -> Path Abs Dir Source #
Make the autogen dir.
data ComponentFile Source #
ComponentFile | |
|
stackLibraryFiles :: StackLibrary -> RIO GetPackageFileContext (NamedComponent, ComponentFile) Source #
Get all files referenced by the library. Handle all libraries (CLib and SubLib), based on empty name or not.
stackExecutableFiles :: StackExecutable -> RIO GetPackageFileContext (NamedComponent, ComponentFile) Source #
Get all files referenced by the executable.
stackTestSuiteFiles :: StackTestSuite -> RIO GetPackageFileContext (NamedComponent, ComponentFile) Source #
Get all files referenced by the test.
stackBenchmarkFiles :: StackBenchmark -> RIO GetPackageFileContext (NamedComponent, ComponentFile) Source #
Get all files referenced by the benchmark.