Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PackageException
- data Package = Package {
- packageName :: !PackageName
- packageVersion :: !Version
- packageFiles :: !GetPackageFiles
- packageDeps :: !(Map PackageName VersionRange)
- packageTools :: ![Dependency]
- packageAllDeps :: !(Set PackageName)
- packageGhcOptions :: ![Text]
- packageFlags :: !(Map FlagName Bool)
- packageDefaultFlags :: !(Map FlagName Bool)
- packageHasLibrary :: !Bool
- packageTests :: !(Map Text TestSuiteInterface)
- packageBenchmarks :: !(Set Text)
- packageExes :: !(Set Text)
- packageOpts :: !GetPackageOpts
- packageHasExposedModules :: !Bool
- packageSimpleType :: !Bool
- packageIdentifier :: Package -> PackageIdentifier
- packageDefinedFlags :: Package -> Set FlagName
- newtype GetPackageOpts = GetPackageOpts {
- getPackageOpts :: forall env m. (MonadIO m, HasEnvConfig env, HasPlatform env, MonadThrow m, MonadReader env m, MonadLogger m, MonadCatch m) => SourceMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> m (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 m env. (MonadIO m, MonadLogger m, MonadThrow m, MonadCatch m, MonadReader env m, HasPlatform env, HasEnvConfig env) => Path Abs File -> m (Map NamedComponent (Set ModuleName), Map NamedComponent (Set DotCabalPath), Set (Path Abs File), [PackageWarning])
- data PackageWarning
- = UnlistedModulesWarning (Path Abs File) (Maybe String) [ModuleName]
- | MissingModulesWarning (Path Abs File) (Maybe String) [ModuleName]
- data PackageConfig = PackageConfig {}
- type SourceMap = Map PackageName PackageSource
- data PackageSource
- class PackageInstallInfo a where
- piiVersion :: a -> Version
- piiLocation :: a -> InstallLocation
- 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))
- data NamedComponent
- 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.
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 (Path Abs File) (Maybe String) [ModuleName] | Modules found that are not listed in cabal file |
MissingModulesWarning (Path Abs File) (Maybe String) [ModuleName] | Modules not found in file system, which are 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
PSLocal LocalPackage | |
PSUpstream Version InstallLocation (Map FlagName Bool) [Text] (Maybe GitSHA1) | Upstream packages could be installed in either local or snapshot
databases; this is what |
class PackageInstallInfo a where Source
Datatype which tells how which version of a package to install and where to install it into
piiVersion :: a -> Version Source
piiLocation :: a -> InstallLocation Source
data LocalPackage Source
Information on a locally available package of source code
LocalPackage | |
|
data NamedComponent Source
A single, fully resolved component of a package
renderPkgComponents :: [(PackageName, NamedComponent)] -> Text Source
exeComponents :: Set NamedComponent -> Set Text Source
testComponents :: 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.