| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SimpleCabal
Synopsis
- findCabalFile :: IO FilePath
- finalPackageDescription :: [(FlagName, Bool)] -> FilePath -> IO PackageDescription
- getPackageId :: IO PackageIdentifier
- buildDepends :: PackageDescription -> [Dependency]
- buildDependencies :: PackageDescription -> [PackageName]
- setupDependencies :: PackageDescription -> [PackageName]
- testsuiteDependencies :: PackageDescription -> [PackageName]
- allBuildInfo :: PackageDescription -> [BuildInfo]
- data BuildInfo = BuildInfo {
- buildable :: Bool
- buildTools :: [LegacyExeDependency]
- buildToolDepends :: [ExeDependency]
- cppOptions :: [String]
- asmOptions :: [String]
- cmmOptions :: [String]
- ccOptions :: [String]
- cxxOptions :: [String]
- ldOptions :: [String]
- pkgconfigDepends :: [PkgconfigDependency]
- frameworks :: [String]
- extraFrameworkDirs :: [String]
- asmSources :: [FilePath]
- cmmSources :: [FilePath]
- cSources :: [FilePath]
- cxxSources :: [FilePath]
- jsSources :: [FilePath]
- hsSourceDirs :: [FilePath]
- otherModules :: [ModuleName]
- virtualModules :: [ModuleName]
- autogenModules :: [ModuleName]
- defaultLanguage :: Maybe Language
- otherLanguages :: [Language]
- defaultExtensions :: [Extension]
- otherExtensions :: [Extension]
- oldExtensions :: [Extension]
- extraLibs :: [String]
- extraGHCiLibs :: [String]
- extraBundledLibs :: [String]
- extraLibFlavours :: [String]
- extraLibDirs :: [String]
- includeDirs :: [FilePath]
- includes :: [FilePath]
- installIncludes :: [FilePath]
- options :: [(CompilerFlavor, [String])]
- profOptions :: [(CompilerFlavor, [String])]
- sharedOptions :: [(CompilerFlavor, [String])]
- staticOptions :: [(CompilerFlavor, [String])]
- customFieldsBI :: [(String, String)]
- targetBuildDepends :: [Dependency]
- mixins :: [Mixin]
- depPkgName :: Dependency -> PackageName
- exeDepName :: LegacyExeDependency -> String
- pkgcfgDepName :: PkgconfigDependency -> String
- data FlagName
- mkFlagName :: String -> FlagName
- data PackageDescription = PackageDescription {
- specVersionRaw :: Either Version VersionRange
- package :: PackageIdentifier
- licenseRaw :: Either License License
- licenseFiles :: [FilePath]
- copyright :: String
- maintainer :: String
- author :: String
- stability :: String
- testedWith :: [(CompilerFlavor, VersionRange)]
- homepage :: String
- pkgUrl :: String
- bugReports :: String
- sourceRepos :: [SourceRepo]
- synopsis :: String
- description :: String
- category :: String
- customFieldsPD :: [(String, String)]
- buildTypeRaw :: Maybe BuildType
- setupBuildInfo :: Maybe SetupBuildInfo
- library :: Maybe Library
- subLibraries :: [Library]
- executables :: [Executable]
- foreignLibs :: [ForeignLib]
- testSuites :: [TestSuite]
- benchmarks :: [Benchmark]
- dataFiles :: [FilePath]
- dataDir :: FilePath
- extraSrcFiles :: [FilePath]
- extraTmpFiles :: [FilePath]
- extraDocFiles :: [FilePath]
- data PackageIdentifier = PackageIdentifier {}
- data PackageName
- mkPackageName :: String -> PackageName
- unPackageName :: PackageName -> String
- packageName :: Package pkg => pkg -> PackageName
- packageVersion :: PackageIdentifier -> String
- readGenericPackageDescription :: Verbosity -> FilePath -> IO GenericPackageDescription
- showPkgId :: PackageIdentifier -> String
- showVersion :: Version -> String
- tryFindPackageDesc :: FilePath -> IO FilePath
Documentation
findCabalFile :: IO FilePath Source #
Find the .cabal file in the current directory.
Errors if more than one or no file found.
since 0.0.0.1
finalPackageDescription :: [(FlagName, Bool)] -> FilePath -> IO PackageDescription Source #
Generate PackageDescription from the specified .cabal file and flags.
since 0.0.0.1
getPackageId :: IO PackageIdentifier Source #
Get the package name-version from the .cabal file in the current directory.
since 0.0.0.1
buildDepends :: PackageDescription -> [Dependency] Source #
buildDependencies :: PackageDescription -> [PackageName] Source #
Return the list of build dependencies of a package, excluding itself
Arguments
| :: PackageDescription | pkg description |
| -> [PackageName] | depends |
testsuiteDependencies :: PackageDescription -> [PackageName] Source #
Return the list of testsuite dependencies of a package, excluding itself
allBuildInfo :: PackageDescription -> [BuildInfo] #
All BuildInfo in the PackageDescription:
libraries, executables, test-suites and benchmarks.
Useful for implementing package checks.
Constructors
| BuildInfo | |
Fields
| |
Instances
depPkgName :: Dependency -> PackageName #
A FlagName is the name of a user-defined configuration flag
Use mkFlagName and unFlagName to convert from/to a String.
This type is opaque since Cabal-2.0
Since: Cabal-2.0.0.2
Instances
mkFlagName :: String -> FlagName #
Construct a FlagName from a String
mkFlagName is the inverse to unFlagName
Note: No validations are performed to ensure that the resulting
FlagName is valid
Since: Cabal-2.0.0.2
data PackageDescription #
This data type is the internal representation of the file pkg.cabal.
It contains two kinds of information about the package: information
which is needed for all packages, such as the package name and version, and
information which is needed for the simple build system only, such as
the compiler options and library name.
Constructors
| PackageDescription | |
Fields
| |
Instances
data PackageIdentifier #
The name and version of a package.
Constructors
| PackageIdentifier | |
Fields
| |
Instances
data PackageName #
A package name.
Use mkPackageName and unPackageName to convert from/to a
String.
This type is opaque since Cabal-2.0
Since: Cabal-2.0.0.2
Instances
mkPackageName :: String -> PackageName #
Construct a PackageName from a String
mkPackageName is the inverse to unPackageName
Note: No validations are performed to ensure that the resulting
PackageName is valid
Since: Cabal-2.0.0.2
unPackageName :: PackageName -> String #
Convert PackageName to String
packageName :: Package pkg => pkg -> PackageName #
readGenericPackageDescription :: Verbosity -> FilePath -> IO GenericPackageDescription #
Parse the given package file.
showPkgId :: PackageIdentifier -> String Source #
showVersion :: Version -> String Source #
tryFindPackageDesc :: FilePath -> IO FilePath #
Like findPackageDesc, but calls die in case of error.