Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PackageException
- = PackageInvalidCabalFile (Either PackageIdentifierRevision (Path Abs File)) PError
- | PackageNoCabalFileFound (Path Abs Dir)
- | PackageMultipleCabalFilesFound (Path Abs Dir) [Path Abs File]
- | MismatchedCabalName (Path Abs File) PackageName
- | MismatchedCabalIdentifier !PackageIdentifierRevision !PackageIdentifier
- data PackageLibraries
- = NoLibraries
- | HasLibraries !(Set Text)
- data Package = Package {
- packageName :: !PackageName
- packageVersion :: !Version
- packageLicense :: !License
- packageFiles :: !GetPackageFiles
- packageDeps :: !(Map PackageName VersionRange)
- packageTools :: !(Map ExeName VersionRange)
- packageAllDeps :: !(Set PackageName)
- packageGhcOptions :: ![Text]
- packageFlags :: !(Map FlagName Bool)
- packageDefaultFlags :: !(Map FlagName Bool)
- packageLibraries :: !PackageLibraries
- packageTests :: !(Map Text TestSuiteInterface)
- packageBenchmarks :: !(Set Text)
- packageExes :: !(Set Text)
- packageOpts :: !GetPackageOpts
- packageHasExposedModules :: !Bool
- packageBuildType :: !(Maybe BuildType)
- packageSetupDeps :: !(Maybe (Map PackageName VersionRange))
- packageIdentifier :: Package -> PackageIdentifier
- packageDefinedFlags :: Package -> Set FlagName
- newtype GetPackageOpts = GetPackageOpts {
- getPackageOpts :: forall env. HasEnvConfig env => SourceMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Set ModuleName), Map NamedComponent (Set DotCabalPath), Map NamedComponent BuildInfoOpts)
- data BuildInfoOpts = BuildInfoOpts {
- bioOpts :: [String]
- bioOneWordOpts :: [String]
- bioPackageFlags :: [String]
- bioCabalMacros :: Maybe (Path Abs File)
- data CabalFileType
- newtype GetPackageFiles = GetPackageFiles {
- getPackageFiles :: forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Set ModuleName), Map NamedComponent (Set DotCabalPath), Set (Path Abs File), [PackageWarning])
- data PackageWarning = UnlistedModulesWarning (Maybe String) [ModuleName]
- data PackageConfig = PackageConfig {}
- type SourceMap = Map PackageName PackageSource
- data PackageSource
- piiVersion :: PackageSource -> Version
- piiLocation :: PackageSource -> InstallLocation
- piiPackageLocation :: PackageSource -> PackageLocationIndex FilePath
- data LocalPackage = LocalPackage {
- lpPackage :: !Package
- lpComponents :: !(Set NamedComponent)
- lpUnbuildable :: !(Set NamedComponent)
- lpWanted :: !Bool
- lpTestDeps :: !(Map PackageName VersionRange)
- lpBenchDeps :: !(Map PackageName VersionRange)
- lpTestBench :: !(Maybe Package)
- lpDir :: !(Path Abs Dir)
- lpCabalFile :: !(Path Abs File)
- lpForceDirty :: !Bool
- lpDirtyFiles :: !(Maybe (Set FilePath))
- lpNewBuildCache :: !(Map FilePath FileCacheInfo)
- lpFiles :: !(Set (Path Abs File))
- lpLocation :: !(PackageLocation FilePath)
- renderComponent :: NamedComponent -> ByteString
- renderPkgComponents :: [(PackageName, NamedComponent)] -> Text
- renderPkgComponent :: (PackageName, NamedComponent) -> Text
- exeComponents :: Set NamedComponent -> Set Text
- testComponents :: Set NamedComponent -> Set Text
- benchComponents :: Set NamedComponent -> Set Text
- isCLib :: NamedComponent -> Bool
- isCExe :: NamedComponent -> Bool
- isCTest :: NamedComponent -> Bool
- isCBench :: NamedComponent -> Bool
- data InstallLocation
- data InstalledPackageLocation
- data FileCacheInfo = FileCacheInfo {
- fciModTime :: !ModTime
- fciSize :: !Word64
- fciHash :: !ByteString
- newtype ModTime = ModTime (Integer, Rational)
- modTimeVC :: VersionConfig ModTime
- testSuccessVC :: VersionConfig Bool
- data DotCabalDescriptor
- dotCabalModule :: DotCabalDescriptor -> Maybe ModuleName
- dotCabalMain :: DotCabalDescriptor -> Maybe FilePath
- data DotCabalPath
- = DotCabalModulePath !(Path Abs File)
- | DotCabalMainPath !(Path Abs File)
- | DotCabalFilePath !(Path Abs File)
- | DotCabalCFilePath !(Path Abs File)
- dotCabalModulePath :: DotCabalPath -> Maybe (Path Abs File)
- dotCabalMainPath :: DotCabalPath -> Maybe (Path Abs File)
- dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File)
- dotCabalGetPath :: DotCabalPath -> Path Abs File
- type InstalledMap = Map PackageName (InstallLocation, Installed)
- data Installed
- installedPackageIdentifier :: Installed -> PackageIdentifier
- installedVersion :: Installed -> Version
Documentation
data PackageException Source #
All exceptions thrown by the library.
data PackageLibraries Source #
Libraries in a package. Since Cabal 2.0, internal libraries are a thing.
NoLibraries | |
HasLibraries !(Set Text) | the foreign library names, sub libraries get built automatically without explicit component name passing |
Some package info.
Package | |
|
newtype GetPackageOpts Source #
Files that the package depends on, relative to package directory. Argument is the location of the .cabal file
GetPackageOpts | |
|
data BuildInfoOpts Source #
GHC options based on cabal information and ghc-options.
BuildInfoOpts | |
|
newtype GetPackageFiles Source #
Files that the package depends on, relative to package directory. Argument is the location of the .cabal file
GetPackageFiles | |
|
data PackageWarning Source #
Warning generated when reading a package
UnlistedModulesWarning (Maybe String) [ModuleName] | Modules found that are not listed in cabal file |
data PackageConfig Source #
Package build configuration
PackageConfig | |
|
type SourceMap = Map PackageName PackageSource Source #
data PackageSource Source #
Where the package's source is located: local directory or package index
PSFiles LocalPackage InstallLocation | Package which exist on the filesystem (as opposed to an index tarball) |
PSIndex InstallLocation (Map FlagName Bool) [Text] PackageIdentifierRevision | Package which is in an index, and the files do not exist on the filesystem yet. |
piiVersion :: PackageSource -> Version Source #
data LocalPackage Source #
Information on a locally available package of source code
LocalPackage | |
|
renderPkgComponents :: [(PackageName, NamedComponent)] -> Text Source #
renderPkgComponent :: (PackageName, NamedComponent) -> Text Source #
exeComponents :: Set NamedComponent -> Set Text Source #
testComponents :: Set NamedComponent -> Set Text Source #
benchComponents :: Set NamedComponent -> Set Text Source #
isCLib :: NamedComponent -> Bool Source #
isCExe :: NamedComponent -> Bool Source #
isCTest :: NamedComponent -> Bool Source #
isCBench :: NamedComponent -> Bool Source #
data InstallLocation Source #
A location to install a package into, either snapshot or local
data FileCacheInfo Source #
FileCacheInfo | |
|
Used for storage and comparison.
data DotCabalDescriptor Source #
A descriptor from a .cabal file indicating one of the following:
exposed-modules: Foo other-modules: Foo or main-is: Foo.hs
dotCabalModule :: DotCabalDescriptor -> Maybe ModuleName Source #
Maybe get the module name from the .cabal descriptor.
dotCabalMain :: DotCabalDescriptor -> Maybe FilePath Source #
Maybe get the main name from the .cabal descriptor.
data DotCabalPath Source #
A path resolved from the .cabal file, which is either main-is or an exposedinternalreferenced module.
dotCabalModulePath :: DotCabalPath -> Maybe (Path Abs File) Source #
Get the module path.
dotCabalMainPath :: DotCabalPath -> Maybe (Path Abs File) Source #
Get the main path.
dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File) Source #
Get the c file path.
dotCabalGetPath :: DotCabalPath -> Path Abs File Source #
Get the path.
type InstalledMap = Map PackageName (InstallLocation, Installed) Source #
installedVersion :: Installed -> Version Source #
Get the installed Version.