Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hpack.Config
Synopsis
- data DecodeOptions = DecodeOptions {
- decodeOptionsProgramName :: ProgramName
- decodeOptionsTarget :: FilePath
- decodeOptionsUserDataDir :: Maybe FilePath
- decodeOptionsDecode :: FilePath -> IO (Either String ([String], Value))
- decodeOptionsFormatYamlParseError :: FilePath -> ParseException -> String
- newtype ProgramName = ProgramName {
- unProgramName :: String
- defaultDecodeOptions :: DecodeOptions
- packageConfig :: FilePath
- data DecodeResult = DecodeResult {
- decodeResultPackage :: Package
- decodeResultCabalVersion :: String
- decodeResultCabalFile :: FilePath
- decodeResultWarnings :: [String]
- readPackageConfig :: DecodeOptions -> IO (Either String DecodeResult)
- readPackageConfigWithError :: DecodeOptions -> IO (Either HpackError DecodeResult)
- renamePackage :: String -> Package -> Package
- packageDependencies :: Package -> [(String, DependencyInfo)]
- package :: String -> String -> Package
- section :: a -> Section a
- data Package = Package {
- packageName :: String
- packageVersion :: String
- packageSynopsis :: Maybe String
- packageDescription :: Maybe String
- packageHomepage :: Maybe String
- packageBugReports :: Maybe String
- packageCategory :: Maybe String
- packageStability :: Maybe String
- packageAuthor :: [String]
- packageMaintainer :: [String]
- packageCopyright :: [String]
- packageBuildType :: BuildType
- packageLicense :: Maybe String
- packageLicenseFile :: [FilePath]
- packageTestedWith :: [String]
- packageFlags :: [Flag]
- packageExtraSourceFiles :: [Path]
- packageExtraDocFiles :: [Path]
- packageDataFiles :: [Path]
- packageDataDir :: Maybe FilePath
- packageSourceRepository :: Maybe SourceRepository
- packageCustomSetup :: Maybe CustomSetup
- packageLibrary :: Maybe (Section Library)
- packageInternalLibraries :: Map String (Section Library)
- packageExecutables :: Map String (Section Executable)
- packageTests :: Map String (Section Executable)
- packageBenchmarks :: Map String (Section Executable)
- packageVerbatim :: [Verbatim]
- newtype Dependencies = Dependencies {
- unDependencies :: Map String DependencyInfo
- data DependencyInfo = DependencyInfo {
- dependencyInfoMixins :: [String]
- dependencyInfoVersion :: DependencyVersion
- data VersionConstraint
- = AnyVersion
- | VersionRange String
- data DependencyVersion = DependencyVersion (Maybe SourceDependency) VersionConstraint
- data SourceDependency
- type GitRef = String
- type GitUrl = String
- data BuildTool
- = BuildTool String String
- | LocalBuildTool String
- newtype SystemBuildTools = SystemBuildTools {
- unSystemBuildTools :: Map String VersionConstraint
- type GhcOption = String
- data Verbatim
- = VerbatimLiteral String
- | VerbatimObject (Map String VerbatimValue)
- data VerbatimValue
- = VerbatimString String
- | VerbatimNumber Scientific
- | VerbatimBool Bool
- | VerbatimNull
- verbatimValueToString :: VerbatimValue -> String
- data CustomSetup = CustomSetup {}
- data Section a = Section {
- sectionData :: a
- sectionSourceDirs :: [FilePath]
- sectionDependencies :: Dependencies
- sectionPkgConfigDependencies :: [String]
- sectionDefaultExtensions :: [String]
- sectionOtherExtensions :: [String]
- sectionLanguage :: Maybe Language
- sectionGhcOptions :: [GhcOption]
- sectionGhcProfOptions :: [GhcProfOption]
- sectionGhcSharedOptions :: [GhcOption]
- sectionGhcjsOptions :: [GhcjsOption]
- sectionCppOptions :: [CppOption]
- sectionAsmOptions :: [AsmOption]
- sectionAsmSources :: [Path]
- sectionCcOptions :: [CcOption]
- sectionCSources :: [Path]
- sectionCxxOptions :: [CxxOption]
- sectionCxxSources :: [Path]
- sectionJsSources :: [Path]
- sectionExtraLibDirs :: [FilePath]
- sectionExtraLibraries :: [FilePath]
- sectionExtraFrameworksDirs :: [FilePath]
- sectionFrameworks :: [FilePath]
- sectionIncludeDirs :: [FilePath]
- sectionInstallIncludes :: [FilePath]
- sectionLdOptions :: [LdOption]
- sectionBuildable :: Maybe Bool
- sectionConditionals :: [Conditional (Section a)]
- sectionBuildTools :: Map BuildTool DependencyVersion
- sectionSystemBuildTools :: SystemBuildTools
- sectionVerbatim :: [Verbatim]
- data Library = Library {
- libraryExposed :: Maybe Bool
- libraryVisibility :: Maybe String
- libraryExposedModules :: [Module]
- libraryOtherModules :: [Module]
- libraryGeneratedModules :: [Module]
- libraryReexportedModules :: [String]
- librarySignatures :: [String]
- data Executable = Executable {
- executableMain :: Maybe FilePath
- executableOtherModules :: [Module]
- executableGeneratedModules :: [Module]
- data Conditional a = Conditional {
- conditionalCondition :: Cond
- conditionalThen :: a
- conditionalElse :: Maybe a
- data Cond
- = CondBool Bool
- | CondExpression String
- data Flag = Flag {
- flagName :: String
- flagDescription :: Maybe String
- flagManual :: Bool
- flagDefault :: Bool
- data SourceRepository = SourceRepository {
- sourceRepositoryUrl :: String
- sourceRepositorySubdir :: Maybe String
- newtype Language = Language String
- data BuildType
- type GhcProfOption = String
- type GhcjsOption = String
- type CppOption = String
- type AsmOption = String
- type CcOption = String
- type LdOption = String
- newtype Path = Path {
- unPath :: FilePath
- newtype Module = Module {
- unModule :: String
Documentation
NOTE: This module is exposed to allow integration of Hpack into other tools. It is not meant for general use by end users. The following caveats apply:
- The API is undocumented, consult the source instead.
- The exposed types and functions primarily serve Hpack's own needs, not that of a public API. Breaking changes can happen as Hpack evolves.
As an Hpack user you either want to use the hpack
executable or a build
tool that supports Hpack (e.g. stack
or cabal2nix
).
data DecodeOptions Source #
Constructors
DecodeOptions | |
Fields
|
newtype ProgramName Source #
Constructors
ProgramName | |
Fields
|
Instances
IsString ProgramName Source # | |
Defined in Hpack.Error Methods fromString :: String -> ProgramName | |
Show ProgramName Source # | |
Defined in Hpack.Error Methods showsPrec :: Int -> ProgramName -> ShowS show :: ProgramName -> String showList :: [ProgramName] -> ShowS | |
Eq ProgramName Source # | |
Defined in Hpack.Error |
packageConfig :: FilePath Source #
data DecodeResult Source #
Constructors
DecodeResult | |
Fields
|
Instances
Show DecodeResult Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> DecodeResult -> ShowS show :: DecodeResult -> String showList :: [DecodeResult] -> ShowS | |
Eq DecodeResult Source # | |
Defined in Hpack.Config |
readPackageConfig :: DecodeOptions -> IO (Either String DecodeResult) Source #
readPackageConfigWithError :: DecodeOptions -> IO (Either HpackError DecodeResult) Source #
renamePackage :: String -> Package -> Package Source #
packageDependencies :: Package -> [(String, DependencyInfo)] Source #
Constructors
Package | |
Fields
|
newtype Dependencies Source #
Constructors
Dependencies | |
Fields
|
Instances
data DependencyInfo Source #
Constructors
DependencyInfo | |
Fields
|
Instances
Show DependencyInfo Source # | |
Defined in Hpack.Syntax.Dependencies Methods showsPrec :: Int -> DependencyInfo -> ShowS show :: DependencyInfo -> String showList :: [DependencyInfo] -> ShowS | |
Eq DependencyInfo Source # | |
Defined in Hpack.Syntax.Dependencies Methods (==) :: DependencyInfo -> DependencyInfo -> Bool (/=) :: DependencyInfo -> DependencyInfo -> Bool | |
Ord DependencyInfo Source # | |
Defined in Hpack.Syntax.Dependencies Methods compare :: DependencyInfo -> DependencyInfo -> Ordering (<) :: DependencyInfo -> DependencyInfo -> Bool (<=) :: DependencyInfo -> DependencyInfo -> Bool (>) :: DependencyInfo -> DependencyInfo -> Bool (>=) :: DependencyInfo -> DependencyInfo -> Bool max :: DependencyInfo -> DependencyInfo -> DependencyInfo min :: DependencyInfo -> DependencyInfo -> DependencyInfo |
data VersionConstraint Source #
Constructors
AnyVersion | |
VersionRange String |
Instances
Show VersionConstraint Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> VersionConstraint -> ShowS show :: VersionConstraint -> String showList :: [VersionConstraint] -> ShowS | |
Eq VersionConstraint Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods (==) :: VersionConstraint -> VersionConstraint -> Bool (/=) :: VersionConstraint -> VersionConstraint -> Bool | |
Ord VersionConstraint Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods compare :: VersionConstraint -> VersionConstraint -> Ordering (<) :: VersionConstraint -> VersionConstraint -> Bool (<=) :: VersionConstraint -> VersionConstraint -> Bool (>) :: VersionConstraint -> VersionConstraint -> Bool (>=) :: VersionConstraint -> VersionConstraint -> Bool max :: VersionConstraint -> VersionConstraint -> VersionConstraint min :: VersionConstraint -> VersionConstraint -> VersionConstraint | |
FromValue VersionConstraint Source # | |
Defined in Hpack.Syntax.DependencyVersion |
data DependencyVersion Source #
Constructors
DependencyVersion (Maybe SourceDependency) VersionConstraint |
Instances
Show DependencyVersion Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> DependencyVersion -> ShowS show :: DependencyVersion -> String showList :: [DependencyVersion] -> ShowS | |
Eq DependencyVersion Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods (==) :: DependencyVersion -> DependencyVersion -> Bool (/=) :: DependencyVersion -> DependencyVersion -> Bool | |
Ord DependencyVersion Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods compare :: DependencyVersion -> DependencyVersion -> Ordering (<) :: DependencyVersion -> DependencyVersion -> Bool (<=) :: DependencyVersion -> DependencyVersion -> Bool (>) :: DependencyVersion -> DependencyVersion -> Bool (>=) :: DependencyVersion -> DependencyVersion -> Bool max :: DependencyVersion -> DependencyVersion -> DependencyVersion min :: DependencyVersion -> DependencyVersion -> DependencyVersion |
data SourceDependency Source #
Instances
Show SourceDependency Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> SourceDependency -> ShowS show :: SourceDependency -> String showList :: [SourceDependency] -> ShowS | |
Eq SourceDependency Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods (==) :: SourceDependency -> SourceDependency -> Bool (/=) :: SourceDependency -> SourceDependency -> Bool | |
Ord SourceDependency Source # | |
Defined in Hpack.Syntax.DependencyVersion Methods compare :: SourceDependency -> SourceDependency -> Ordering (<) :: SourceDependency -> SourceDependency -> Bool (<=) :: SourceDependency -> SourceDependency -> Bool (>) :: SourceDependency -> SourceDependency -> Bool (>=) :: SourceDependency -> SourceDependency -> Bool max :: SourceDependency -> SourceDependency -> SourceDependency min :: SourceDependency -> SourceDependency -> SourceDependency |
Constructors
BuildTool String String | |
LocalBuildTool String |
newtype SystemBuildTools Source #
Constructors
SystemBuildTools | |
Fields
|
Instances
Monoid SystemBuildTools Source # | |
Defined in Hpack.Syntax.BuildTools Methods mappend :: SystemBuildTools -> SystemBuildTools -> SystemBuildTools mconcat :: [SystemBuildTools] -> SystemBuildTools | |
Semigroup SystemBuildTools Source # | |
Defined in Hpack.Syntax.BuildTools Methods (<>) :: SystemBuildTools -> SystemBuildTools -> SystemBuildTools sconcat :: NonEmpty SystemBuildTools -> SystemBuildTools stimes :: Integral b => b -> SystemBuildTools -> SystemBuildTools | |
Show SystemBuildTools Source # | |
Defined in Hpack.Syntax.BuildTools Methods showsPrec :: Int -> SystemBuildTools -> ShowS show :: SystemBuildTools -> String showList :: [SystemBuildTools] -> ShowS | |
Eq SystemBuildTools Source # | |
Defined in Hpack.Syntax.BuildTools Methods (==) :: SystemBuildTools -> SystemBuildTools -> Bool (/=) :: SystemBuildTools -> SystemBuildTools -> Bool | |
FromValue SystemBuildTools Source # | |
Defined in Hpack.Syntax.BuildTools |
Constructors
VerbatimLiteral String | |
VerbatimObject (Map String VerbatimValue) |
data VerbatimValue Source #
Constructors
VerbatimString String | |
VerbatimNumber Scientific | |
VerbatimBool Bool | |
VerbatimNull |
Instances
Show VerbatimValue Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> VerbatimValue -> ShowS show :: VerbatimValue -> String showList :: [VerbatimValue] -> ShowS | |
Eq VerbatimValue Source # | |
Defined in Hpack.Config | |
FromValue VerbatimValue Source # | |
Defined in Hpack.Config |
verbatimValueToString :: VerbatimValue -> String Source #
data CustomSetup Source #
Constructors
CustomSetup | |
Fields |
Instances
Show CustomSetup Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> CustomSetup -> ShowS show :: CustomSetup -> String showList :: [CustomSetup] -> ShowS | |
Eq CustomSetup Source # | |
Defined in Hpack.Config |
Constructors
Section | |
Fields
|
Instances
Foldable Section Source # | |
Defined in Hpack.Config Methods fold :: Monoid m => Section m -> m foldMap :: Monoid m => (a -> m) -> Section a -> m foldMap' :: Monoid m => (a -> m) -> Section a -> m foldr :: (a -> b -> b) -> b -> Section a -> b foldr' :: (a -> b -> b) -> b -> Section a -> b foldl :: (b -> a -> b) -> b -> Section a -> b foldl' :: (b -> a -> b) -> b -> Section a -> b foldr1 :: (a -> a -> a) -> Section a -> a foldl1 :: (a -> a -> a) -> Section a -> a elem :: Eq a => a -> Section a -> Bool maximum :: Ord a => Section a -> a minimum :: Ord a => Section a -> a | |
Traversable Section Source # | |
Functor Section Source # | |
Show a => Show (Section a) Source # | |
Eq a => Eq (Section a) Source # | |
Constructors
Library | |
Fields
|
data Executable Source #
Constructors
Executable | |
Fields
|
Instances
Show Executable Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> Executable -> ShowS show :: Executable -> String showList :: [Executable] -> ShowS | |
Eq Executable Source # | |
Defined in Hpack.Config |
data Conditional a Source #
Constructors
Conditional | |
Fields
|
Instances
Foldable Conditional Source # | |
Defined in Hpack.Config Methods fold :: Monoid m => Conditional m -> m foldMap :: Monoid m => (a -> m) -> Conditional a -> m foldMap' :: Monoid m => (a -> m) -> Conditional a -> m foldr :: (a -> b -> b) -> b -> Conditional a -> b foldr' :: (a -> b -> b) -> b -> Conditional a -> b foldl :: (b -> a -> b) -> b -> Conditional a -> b foldl' :: (b -> a -> b) -> b -> Conditional a -> b foldr1 :: (a -> a -> a) -> Conditional a -> a foldl1 :: (a -> a -> a) -> Conditional a -> a toList :: Conditional a -> [a] null :: Conditional a -> Bool length :: Conditional a -> Int elem :: Eq a => a -> Conditional a -> Bool maximum :: Ord a => Conditional a -> a minimum :: Ord a => Conditional a -> a sum :: Num a => Conditional a -> a product :: Num a => Conditional a -> a | |
Traversable Conditional Source # | |
Defined in Hpack.Config Methods traverse :: Applicative f => (a -> f b) -> Conditional a -> f (Conditional b) sequenceA :: Applicative f => Conditional (f a) -> f (Conditional a) mapM :: Monad m => (a -> m b) -> Conditional a -> m (Conditional b) sequence :: Monad m => Conditional (m a) -> m (Conditional a) | |
Functor Conditional Source # | |
Defined in Hpack.Config Methods fmap :: (a -> b) -> Conditional a -> Conditional b (<$) :: a -> Conditional b -> Conditional a | |
Show a => Show (Conditional a) Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> Conditional a -> ShowS show :: Conditional a -> String showList :: [Conditional a] -> ShowS | |
Eq a => Eq (Conditional a) Source # | |
Defined in Hpack.Config |
Constructors
CondBool Bool | |
CondExpression String |
Constructors
Flag | |
Fields
|
data SourceRepository Source #
Constructors
SourceRepository | |
Fields
|
Instances
Show SourceRepository Source # | |
Defined in Hpack.Config Methods showsPrec :: Int -> SourceRepository -> ShowS show :: SourceRepository -> String showList :: [SourceRepository] -> ShowS | |
Eq SourceRepository Source # | |
Defined in Hpack.Config Methods (==) :: SourceRepository -> SourceRepository -> Bool (/=) :: SourceRepository -> SourceRepository -> Bool |
Constructors
Language String |
Instances
Bounded BuildType Source # | |
Defined in Hpack.Config | |
Enum BuildType Source # | |
Show BuildType Source # | |
Eq BuildType Source # | |
FromValue BuildType Source # | |
type GhcProfOption = String Source #
type GhcjsOption = String Source #