Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data PackageException
- data PackageLibraries
- = NoLibraries
- | HasLibraries !(Set Text)
- newtype ExeName = ExeName {}
- 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]
- packageCabalConfigOpts :: ![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))
- packageCabalSpec :: !VersionRange
- packageIdent :: Package -> PackageIdentifier
- data DepValue = DepValue {
- dvVersionRange :: !VersionRange
- dvType :: !DepType
- data DepType
- packageIdentifier :: Package -> PackageIdentifier
- packageDefinedFlags :: Package -> Set FlagName
- type InstallMap = Map PackageName (InstallLocation, Version)
- newtype GetPackageOpts = GetPackageOpts {
- getPackageOpts :: forall env. HasEnvConfig env => InstallMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [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 [DotCabalPath], Set (Path Abs File), [PackageWarning])
- data PackageWarning = UnlistedModulesWarning NamedComponent [ModuleName]
- data PackageConfig = PackageConfig {}
- data PackageSource
- psVersion :: PackageSource -> Version
- data LocalPackage = LocalPackage {
- lpPackage :: !Package
- lpComponents :: !(Set NamedComponent)
- lpUnbuildable :: !(Set NamedComponent)
- lpWanted :: !Bool
- lpTestDeps :: !(Map PackageName VersionRange)
- lpBenchDeps :: !(Map PackageName VersionRange)
- lpTestBench :: !(Maybe Package)
- lpCabalFile :: !(Path Abs File)
- lpBuildHaddocks :: !Bool
- lpForceDirty :: !Bool
- lpDirtyFiles :: !(MemoizedWith EnvConfig (Maybe (Set FilePath)))
- lpNewBuildCaches :: !(MemoizedWith EnvConfig (Map NamedComponent (Map FilePath FileCacheInfo)))
- lpComponentFiles :: !(MemoizedWith EnvConfig (Map NamedComponent (Set (Path Abs File))))
- newtype MemoizedWith env a = MemoizedWith {
- unMemoizedWith :: RIO env a
- memoizeRefWith :: MonadIO m => RIO env a -> m (MemoizedWith env a)
- runMemoizedWith :: (HasEnvConfig env, MonadReader env m, MonadIO m) => MemoizedWith EnvConfig a -> m a
- lpFiles :: HasEnvConfig env => LocalPackage -> RIO env (Set (Path Abs File))
- data InstallLocation
- data InstalledPackageLocation
- data FileCacheInfo = FileCacheInfo {}
- 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.
PackageInvalidCabalFile !(Either PackageIdentifierRevision (Path Abs File)) !(Maybe Version) ![PError] ![PWarning] | |
MismatchedCabalIdentifier !PackageIdentifierRevision !PackageIdentifier |
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 # |
Name of an executable.
Instances
Eq ExeName Source # | |
Data ExeName Source # | |
Defined in Stack.Types.Package gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ExeName -> c ExeName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ExeName # toConstr :: ExeName -> Constr # dataTypeOf :: ExeName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ExeName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExeName) # gmapT :: (forall b. Data b => b -> b) -> ExeName -> ExeName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ExeName -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ExeName -> r # gmapQ :: (forall d. Data d => d -> u) -> ExeName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ExeName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # | |
Ord ExeName Source # | |
Show ExeName Source # | |
IsString ExeName Source # | |
Defined in Stack.Types.Package fromString :: String -> ExeName # | |
Generic ExeName Source # | |
NFData ExeName Source # | |
Defined in Stack.Types.Package | |
Hashable ExeName Source # | |
Defined in Stack.Types.Package | |
type Rep ExeName Source # | |
Defined in Stack.Types.Package |
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
type InstallMap = Map PackageName (InstallLocation, Version) Source #
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 # |
data PackageSource Source #
Where the package's source is located: local directory or package index
PSFilePath LocalPackage | Package which exist on the filesystem |
PSRemote PackageLocationImmutable Version FromSnapshot CommonPackage | Package which is downloaded remotely. |
Instances
Show PackageSource Source # | |
Defined in Stack.Types.Package showsPrec :: Int -> PackageSource -> ShowS # show :: PackageSource -> String # showList :: [PackageSource] -> ShowS # |
psVersion :: 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 # |
newtype MemoizedWith env a Source #
MemoizedWith | |
|
Instances
memoizeRefWith :: MonadIO m => RIO env a -> m (MemoizedWith env a) Source #
runMemoizedWith :: (HasEnvConfig env, MonadReader env m, MonadIO m) => MemoizedWith EnvConfig a -> m a Source #
lpFiles :: HasEnvConfig env => LocalPackage -> RIO env (Set (Path Abs File)) Source #
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 #
Instances
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.