The Haskell CabalSource codeContentsIndex
Distribution.Package
Portability
Stability alpha
Maintainer Isaac Jones <ijones@syntaxpolice.org>
Description
Explanation: Package description and parsing
Synopsis
data PackageIdentifier = PackageIdentifier {
pkgName :: String
pkgVersion :: Version
}
showPackageId :: PackageIdentifier -> String
data PackageDescription = PackageDescription {
package :: PackageIdentifier
license :: License
copyright :: String
maintainer :: String
author :: String
stability :: String
testedWith :: [(CompilerFlavor, VersionRange)]
homepage :: String
pkgUrl :: String
description :: String
category :: String
library :: (Maybe BuildInfo)
executables :: [Executable]
}
emptyPackageDescription :: PackageDescription
readPackageDescription :: FilePath -> IO PackageDescription
parseDescription :: String -> Either PError PackageDescription
writePackageDescription :: FilePath -> PackageDescription -> IO ()
showPackageDescription :: PackageDescription -> String
basicStanzaFields :: [StanzaField PackageDescription]
setupMessage :: String -> PackageDescription -> IO ()
withLib :: PackageDescription -> (BuildInfo -> IO ()) -> IO ()
hasLibs :: PackageDescription -> Bool
data BuildInfo = BuildInfo {
buildDepends :: [Dependency]
modules :: [String]
exposedModules :: [String]
cSources :: [FilePath]
hsSourceDir :: FilePath
extensions :: [Extension]
extraLibs :: [String]
includeDirs :: [FilePath]
includes :: [FilePath]
options :: [(CompilerFlavor, [String])]
}
emptyBuildInfo :: BuildInfo
data Executable = Executable {
exeName :: String
modulePath :: FilePath
buildInfo :: BuildInfo
}
emptyExecutable :: Executable
data StanzaField a = StanzaField {
fieldName :: String
fieldShow :: (a -> Doc)
fieldGet :: (a -> Doc)
fieldSet :: (LineNo -> String -> a -> Either PError a)
}
allModules :: PackageDescription -> [String]
Documentation
data PackageIdentifier
Constructors
PackageIdentifier
pkgName :: String
pkgVersion :: Version
Instances
Read PackageIdentifier
Show PackageIdentifier
Eq PackageIdentifier
showPackageId :: PackageIdentifier -> String
data PackageDescription
This data type is the internal representation of the file pkg.descr. 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
package :: PackageIdentifier
license :: License
copyright :: String
maintainer :: String
author :: String
stability :: String
testedWith :: [(CompilerFlavor, VersionRange)]
homepage :: String
pkgUrl :: String
description :: String
category :: String
library :: (Maybe BuildInfo)
executables :: [Executable]
Instances
Show PackageDescription
Read PackageDescription
Eq PackageDescription
emptyPackageDescription :: PackageDescription
readPackageDescription :: FilePath -> IO PackageDescription
Parse the given package file.
parseDescription :: String -> Either PError PackageDescription
writePackageDescription :: FilePath -> PackageDescription -> IO ()
showPackageDescription :: PackageDescription -> String
basicStanzaFields :: [StanzaField PackageDescription]
setupMessage :: String -> PackageDescription -> IO ()
withLib :: PackageDescription -> (BuildInfo -> IO ()) -> IO ()
If the package description has a library section, call the given function with the library build info as argument.
hasLibs :: PackageDescription -> Bool
does this package have any libraries?
data BuildInfo
Constructors
BuildInfo
buildDepends :: [Dependency]
modules :: [String]
exposedModules :: [String]
cSources :: [FilePath]
hsSourceDir :: FilePath
extensions :: [Extension]
extraLibs :: [String]
includeDirs :: [FilePath]
includes :: [FilePath]
options :: [(CompilerFlavor, [String])]
Instances
Show BuildInfo
Read BuildInfo
Eq BuildInfo
emptyBuildInfo :: BuildInfo
data Executable
Constructors
Executable
exeName :: String
modulePath :: FilePath
buildInfo :: BuildInfo
Instances
Show Executable
Read Executable
Eq Executable
emptyExecutable :: Executable
data StanzaField a
Constructors
StanzaField
fieldName :: String
fieldShow :: (a -> Doc)
fieldGet :: (a -> Doc)
fieldSet :: (LineNo -> String -> a -> Either PError a)
allModules :: PackageDescription -> [String]
Get all the module names from this package
Produced by Haddock version 0.6