-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Cabal file wrapper library -- -- Find and read .cabal files, and a Cabal dependency compatibility -- layer. @package simple-cabal @version 0.1.0 module SimpleCabal -- | Find the .cabal file in the current directory. -- -- Errors if more than one or no file found. -- -- since 0.0.0.1 findCabalFile :: IO FilePath -- | Generate PackageDescription from the specified .cabal file and flags. -- -- since 0.0.0.1 finalPackageDescription :: [(FlagName, Bool)] -> FilePath -> IO PackageDescription -- | Get the package name-version from the .cabal file in the current -- directory. -- -- since 0.0.0.1 getPackageId :: IO PackageIdentifier buildDepends :: PackageDescription -> [Dependency] -- | Return the list of build dependencies of a package, excluding itself buildDependencies :: PackageDescription -> [PackageName] setupDependencies :: PackageDescription -> [PackageName] -- | Return the list of testsuite dependencies of a package, excluding -- itself testsuiteDependencies :: PackageDescription -> [PackageName] -- | All BuildInfo in the PackageDescription: libraries, -- executables, test-suites and benchmarks. -- -- Useful for implementing package checks. allBuildInfo :: PackageDescription -> [BuildInfo] data BuildInfo BuildInfo :: Bool -> [LegacyExeDependency] -> [ExeDependency] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [PkgconfigDependency] -> [String] -> [String] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [ModuleName] -> [ModuleName] -> [ModuleName] -> Maybe Language -> [Language] -> [Extension] -> [Extension] -> [Extension] -> [String] -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [FilePath] -> [FilePath] -> [(CompilerFlavor, [String])] -> [(CompilerFlavor, [String])] -> [(CompilerFlavor, [String])] -> [(CompilerFlavor, [String])] -> [(String, String)] -> [Dependency] -> [Mixin] -> BuildInfo -- | component is buildable here [buildable] :: BuildInfo -> Bool -- | Tools needed to build this bit. -- -- This is a legacy field that buildToolDepends largely -- supersedes. -- -- Unless use are very sure what you are doing, use the functions in -- Distribution.Simple.BuildToolDepends rather than accessing this -- field directly. [buildTools] :: BuildInfo -> [LegacyExeDependency] -- | Haskell tools needed to build this bit -- -- This field is better than buildTools because it allows one to -- precisely specify an executable in a package. -- -- Unless use are very sure what you are doing, use the functions in -- Distribution.Simple.BuildToolDepends rather than accessing this -- field directly. [buildToolDepends] :: BuildInfo -> [ExeDependency] -- | options for pre-processing Haskell code [cppOptions] :: BuildInfo -> [String] -- | options for assmebler [asmOptions] :: BuildInfo -> [String] -- | options for C-- compiler [cmmOptions] :: BuildInfo -> [String] -- | options for C compiler [ccOptions] :: BuildInfo -> [String] -- | options for C++ compiler [cxxOptions] :: BuildInfo -> [String] -- | options for linker [ldOptions] :: BuildInfo -> [String] -- | pkg-config packages that are used [pkgconfigDepends] :: BuildInfo -> [PkgconfigDependency] -- | support frameworks for Mac OS X [frameworks] :: BuildInfo -> [String] -- | extra locations to find frameworks. [extraFrameworkDirs] :: BuildInfo -> [String] -- | Assembly files. [asmSources] :: BuildInfo -> [FilePath] -- | C-- files. [cmmSources] :: BuildInfo -> [FilePath] [cSources] :: BuildInfo -> [FilePath] [cxxSources] :: BuildInfo -> [FilePath] [jsSources] :: BuildInfo -> [FilePath] -- | where to look for the Haskell module hierarchy [hsSourceDirs] :: BuildInfo -> [FilePath] -- | non-exposed or non-main modules [otherModules] :: BuildInfo -> [ModuleName] -- | exposed modules that do not have a source file (e.g. GHC.Prim -- from ghc-prim package) [virtualModules] :: BuildInfo -> [ModuleName] -- | not present on sdist, Paths_* or user-generated with a custom Setup.hs [autogenModules] :: BuildInfo -> [ModuleName] -- | language used when not explicitly specified [defaultLanguage] :: BuildInfo -> Maybe Language -- | other languages used within the package [otherLanguages] :: BuildInfo -> [Language] -- | language extensions used by all modules [defaultExtensions] :: BuildInfo -> [Extension] -- | other language extensions used within the package [otherExtensions] :: BuildInfo -> [Extension] -- | the old extensions field, treated same as defaultExtensions [oldExtensions] :: BuildInfo -> [Extension] -- | what libraries to link with when compiling a program that uses your -- package [extraLibs] :: BuildInfo -> [String] -- | if present, overrides extraLibs when package is loaded with GHCi. [extraGHCiLibs] :: BuildInfo -> [String] -- | if present, adds libs to hs-lirbaries, which become part of the -- package. Example: the Cffi library shipping with the rts, alognside -- the HSrts-1.0.a,.o,... Example 2: a library that is being built by a -- foreing tool (e.g. rust) and copied and registered together with this -- library. The logic on how this library is built will have to be -- encoded in a custom Setup for now. Oherwise cabal would need to lear -- how to call arbitary lirbary builders. [extraBundledLibs] :: BuildInfo -> [String] -- | Hidden Flag. This set of strings, will be appended to all lirbaries -- when copying. E.g. [libHSname_flavour | flavour <- -- extraLibFlavours]. This should only be needed in very specific cases, -- e.g. the rts package, where there are multiple copies of -- slightly differently built libs. [extraLibFlavours] :: BuildInfo -> [String] [extraLibDirs] :: BuildInfo -> [String] -- | directories to find .h files [includeDirs] :: BuildInfo -> [FilePath] -- | The .h files to be found in includeDirs [includes] :: BuildInfo -> [FilePath] -- | .h files to install with the package [installIncludes] :: BuildInfo -> [FilePath] [options] :: BuildInfo -> [(CompilerFlavor, [String])] [profOptions] :: BuildInfo -> [(CompilerFlavor, [String])] [sharedOptions] :: BuildInfo -> [(CompilerFlavor, [String])] [staticOptions] :: BuildInfo -> [(CompilerFlavor, [String])] -- | Custom fields starting with x-, stored in a simple assoc-list. [customFieldsBI] :: BuildInfo -> [(String, String)] -- | Dependencies specific to a library or executable target [targetBuildDepends] :: BuildInfo -> [Dependency] [mixins] :: BuildInfo -> [Mixin] depPkgName :: Dependency -> PackageName exeDepName :: LegacyExeDependency -> String pkgcfgDepName :: PkgconfigDependency -> String -- | 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 data 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 mkFlagName :: String -> FlagName -- | 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. data PackageDescription PackageDescription :: Either Version VersionRange -> PackageIdentifier -> Either License License -> [FilePath] -> String -> String -> String -> String -> [(CompilerFlavor, VersionRange)] -> String -> String -> String -> [SourceRepo] -> String -> String -> String -> [(String, String)] -> Maybe BuildType -> Maybe SetupBuildInfo -> Maybe Library -> [Library] -> [Executable] -> [ForeignLib] -> [TestSuite] -> [Benchmark] -> [FilePath] -> FilePath -> [FilePath] -> [FilePath] -> [FilePath] -> PackageDescription -- | The version of the Cabal spec that this package description uses. For -- historical reasons this is specified with a version range but only -- ranges of the form >= v make sense. We are in the process -- of transitioning to specifying just a single version, not a range. See -- also specVersion. [specVersionRaw] :: PackageDescription -> Either Version VersionRange [package] :: PackageDescription -> PackageIdentifier [licenseRaw] :: PackageDescription -> Either License License [licenseFiles] :: PackageDescription -> [FilePath] [copyright] :: PackageDescription -> String [maintainer] :: PackageDescription -> String [author] :: PackageDescription -> String [stability] :: PackageDescription -> String [testedWith] :: PackageDescription -> [(CompilerFlavor, VersionRange)] [homepage] :: PackageDescription -> String [pkgUrl] :: PackageDescription -> String [bugReports] :: PackageDescription -> String [sourceRepos] :: PackageDescription -> [SourceRepo] -- | A one-line summary of this package [synopsis] :: PackageDescription -> String -- | A more verbose description of this package [description] :: PackageDescription -> String [category] :: PackageDescription -> String -- | Custom fields starting with x-, stored in a simple assoc-list. [customFieldsPD] :: PackageDescription -> [(String, String)] -- | The original build-type value as parsed from the -- .cabal file without defaulting. See also buildType. [buildTypeRaw] :: PackageDescription -> Maybe BuildType [setupBuildInfo] :: PackageDescription -> Maybe SetupBuildInfo [library] :: PackageDescription -> Maybe Library [subLibraries] :: PackageDescription -> [Library] [executables] :: PackageDescription -> [Executable] [foreignLibs] :: PackageDescription -> [ForeignLib] [testSuites] :: PackageDescription -> [TestSuite] [benchmarks] :: PackageDescription -> [Benchmark] [dataFiles] :: PackageDescription -> [FilePath] [dataDir] :: PackageDescription -> FilePath [extraSrcFiles] :: PackageDescription -> [FilePath] [extraTmpFiles] :: PackageDescription -> [FilePath] [extraDocFiles] :: PackageDescription -> [FilePath] -- | The name and version of a package. data PackageIdentifier PackageIdentifier :: PackageName -> Version -> PackageIdentifier -- | The name of this package, eg. foo [pkgName] :: PackageIdentifier -> PackageName -- | the version of this package, eg 1.2 [pkgVersion] :: PackageIdentifier -> Version -- | A package name. -- -- Use mkPackageName and unPackageName to convert from/to a -- String. -- -- This type is opaque since Cabal-2.0 data 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 mkPackageName :: String -> PackageName -- | Convert PackageName to String unPackageName :: PackageName -> String packageName :: Package pkg => pkg -> PackageName packageVersion :: PackageIdentifier -> String -- | Parse the given package file. readGenericPackageDescription :: Verbosity -> FilePath -> IO GenericPackageDescription showPkgId :: PackageIdentifier -> String showVersion :: Version -> String -- | Like findPackageDesc, but calls die in case of error. tryFindPackageDesc :: FilePath -> IO FilePath