Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data PackageException
- = PackageInvalidCabalFile !(Either PackageIdentifierRevision (Path Abs File)) !(Maybe Version) ![PError] ![PWarning]
- | 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 :: !(Either License License)
- packageFiles :: !GetPackageFiles
- packageDeps :: !(Map PackageName DepValue)
- packageUnknownTools :: !(Set ExeName)
- packageAllDeps :: !(Set PackageName)
- packageGhcOptions :: ![Text]
- packageFlags :: !(Map FlagName Bool)
- packageDefaultFlags :: !(Map FlagName Bool)
- packageLibraries :: !PackageLibraries
- packageInternalLibraries :: !(Set Text)
- packageTests :: !(Map Text TestSuiteInterface)
- packageBenchmarks :: !(Set Text)
- packageExes :: !(Set Text)
- packageOpts :: !GetPackageOpts
- packageHasExposedModules :: !Bool
- packageBuildType :: !BuildType
- packageSetupDeps :: !(Maybe (Map PackageName VersionRange))
- data DepValue = DepValue {
- dvVersionRange :: !VersionRange
- dvType :: !DepType
- data DepType
- 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 (Map ModuleName (Path Abs File)), Map NamedComponent (Set DotCabalPath), Map NamedComponent BuildInfoOpts)
- data BuildInfoOpts = BuildInfoOpts {
- bioOpts :: [String]
- bioOneWordOpts :: [String]
- bioPackageFlags :: [String]
- bioCabalMacros :: Path Abs File
- data CabalFileType
- newtype GetPackageFiles = GetPackageFiles {
- getPackageFiles :: forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent (Set DotCabalPath), Set (Path Abs File), [PackageWarning])
- data PackageWarning = UnlistedModulesWarning NamedComponent [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))
- lpNewBuildCaches :: !(Map NamedComponent (Map FilePath FileCacheInfo))
- lpComponentFiles :: !(Map NamedComponent (Set (Path Abs File)))
- lpLocation :: !(PackageLocation FilePath)
- lpFiles :: LocalPackage -> Set (Path Abs File)
- 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.
Instances
Show PackageException Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> PackageException -> ShowS # show :: PackageException -> String # showList :: [PackageException] -> ShowS # | |
Exception PackageException Source # | |
Defined in Stack.Types.Package |
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 |
Instances
Show PackageLibraries Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> PackageLibraries -> ShowS # show :: PackageLibraries -> String # showList :: [PackageLibraries] -> ShowS # |
Some package info.
Package | |
|
The value for a map from dependency name. This contains both the version range and the type of dependency, and provides a semigroup instance.
DepValue | |
|
Is this package being used as a library, or just as a build tool? If the former, we need to ensure that a library actually exists. See https://github.com/commercialhaskell/stack/issues/2195
newtype GetPackageOpts Source #
Files that the package depends on, relative to package directory. Argument is the location of the .cabal file
GetPackageOpts | |
|
Instances
Show GetPackageOpts Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> GetPackageOpts -> ShowS # show :: GetPackageOpts -> String # showList :: [GetPackageOpts] -> ShowS # |
data BuildInfoOpts Source #
GHC options based on cabal information and ghc-options.
BuildInfoOpts | |
|
Instances
Show BuildInfoOpts Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> BuildInfoOpts -> ShowS # show :: BuildInfoOpts -> String # showList :: [BuildInfoOpts] -> ShowS # |
newtype GetPackageFiles Source #
Files that the package depends on, relative to package directory. Argument is the location of the .cabal file
GetPackageFiles | |
|
Instances
Show GetPackageFiles Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> GetPackageFiles -> ShowS # show :: GetPackageFiles -> String # showList :: [GetPackageFiles] -> ShowS # |
data PackageWarning Source #
Warning generated when reading a package
UnlistedModulesWarning NamedComponent [ModuleName] | Modules found that are not listed in cabal file |
data PackageConfig Source #
Package build configuration
PackageConfig | |
|
Instances
Show PackageConfig Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> PackageConfig -> ShowS # show :: PackageConfig -> String # showList :: [PackageConfig] -> ShowS # |
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. |
Instances
Show PackageSource Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> PackageSource -> ShowS # show :: PackageSource -> String # showList :: [PackageSource] -> ShowS # |
piiVersion :: PackageSource -> Version Source #
data LocalPackage Source #
Information on a locally available package of source code
LocalPackage | |
|
Instances
Show LocalPackage Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> LocalPackage -> ShowS # show :: LocalPackage -> String # showList :: [LocalPackage] -> ShowS # |
data InstallLocation Source #
A location to install a package into, either snapshot or local
Instances
Eq InstallLocation Source # | |
Defined in Stack.Types.Package (==) :: InstallLocation -> InstallLocation -> Bool # (/=) :: InstallLocation -> InstallLocation -> Bool # | |
Show InstallLocation Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> InstallLocation -> ShowS # show :: InstallLocation -> String # showList :: [InstallLocation] -> ShowS # | |
Semigroup InstallLocation Source # | |
Defined in Stack.Types.Package (<>) :: InstallLocation -> InstallLocation -> InstallLocation # sconcat :: NonEmpty InstallLocation -> InstallLocation # stimes :: Integral b => b -> InstallLocation -> InstallLocation # | |
Monoid InstallLocation Source # | |
Defined in Stack.Types.Package mappend :: InstallLocation -> InstallLocation -> InstallLocation # mconcat :: [InstallLocation] -> InstallLocation # |
data InstalledPackageLocation Source #
Instances
Eq InstalledPackageLocation Source # | |
Defined in Stack.Types.Package | |
Show InstalledPackageLocation Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> InstalledPackageLocation -> ShowS # show :: InstalledPackageLocation -> String # showList :: [InstalledPackageLocation] -> ShowS # |
data FileCacheInfo Source #
FileCacheInfo | |
|
Instances
Used for storage and comparison.
Instances
Eq ModTime Source # | |
Data ModTime Source # | |
Defined in Stack.Types.Package gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModTime -> c ModTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModTime # toConstr :: ModTime -> Constr # dataTypeOf :: ModTime -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModTime) # gmapT :: (forall b. Data b => b -> b) -> ModTime -> ModTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModTime -> r # gmapQ :: (forall d. Data d => d -> u) -> ModTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ModTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime # | |
Ord ModTime Source # | |
Show ModTime Source # | |
Generic ModTime Source # | |
NFData ModTime Source # | |
Defined in Stack.Types.Package | |
Store ModTime Source # | |
type Rep ModTime Source # | |
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
Instances
Eq DotCabalDescriptor Source # | |
Defined in Stack.Types.Package (==) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # (/=) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # | |
Ord DotCabalDescriptor Source # | |
Defined in Stack.Types.Package compare :: DotCabalDescriptor -> DotCabalDescriptor -> Ordering # (<) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # (<=) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # (>) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # (>=) :: DotCabalDescriptor -> DotCabalDescriptor -> Bool # max :: DotCabalDescriptor -> DotCabalDescriptor -> DotCabalDescriptor # min :: DotCabalDescriptor -> DotCabalDescriptor -> DotCabalDescriptor # | |
Show DotCabalDescriptor Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> DotCabalDescriptor -> ShowS # show :: DotCabalDescriptor -> String # showList :: [DotCabalDescriptor] -> ShowS # |
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 !(Path Abs File) | |
DotCabalMainPath !(Path Abs File) | |
DotCabalFilePath !(Path Abs File) | |
DotCabalCFilePath !(Path Abs File) |
Instances
Eq DotCabalPath Source # | |
Defined in Stack.Types.Package (==) :: DotCabalPath -> DotCabalPath -> Bool # (/=) :: DotCabalPath -> DotCabalPath -> Bool # | |
Ord DotCabalPath Source # | |
Defined in Stack.Types.Package compare :: DotCabalPath -> DotCabalPath -> Ordering # (<) :: DotCabalPath -> DotCabalPath -> Bool # (<=) :: DotCabalPath -> DotCabalPath -> Bool # (>) :: DotCabalPath -> DotCabalPath -> Bool # (>=) :: DotCabalPath -> DotCabalPath -> Bool # max :: DotCabalPath -> DotCabalPath -> DotCabalPath # min :: DotCabalPath -> DotCabalPath -> DotCabalPath # | |
Show DotCabalPath Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> DotCabalPath -> ShowS # show :: DotCabalPath -> String # showList :: [DotCabalPath] -> ShowS # |
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.