hpack-0.35.2: A modern format for Haskell packages

Safe Haskell | Safe-Inferred
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
  - = GitRef GitUrl GitRef (Maybe FilePath)
  - | Local FilePath
- 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 {
  - customSetupDependencies :: Dependencies
  }
- 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]
  - 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
  - = Simple
  - | Configure
  - | Make
  - | Custom
- type GhcProfOption = String
- type GhcjsOption = String
- type CppOption = 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

- decodeOptionsProgramName :: ProgramName
- decodeOptionsTarget :: FilePath
- decodeOptionsUserDataDir :: Maybe FilePath
- decodeOptionsDecode :: FilePath -> IO (Either String ([String], Value))
- decodeOptionsFormatYamlParseError :: FilePath -> ParseException -> String

newtype ProgramName Source #

Constructors

ProgramName |

Fields

- unProgramName :: String

#### Instances

Instances details

IsString ProgramName Source # |
Instance details Defined in Hpack.Error Methods fromString :: String -> ProgramName Source #
Show ProgramName Source # |
Instance details Defined in Hpack.Error Methods showsPrec :: Int -> ProgramName -> ShowS Source # show :: ProgramName -> String Source # showList :: [ProgramName] -> ShowS Source #
Eq ProgramName Source # |
Instance details Defined in Hpack.Error Methods (==) :: ProgramName -> ProgramName -> Bool Source # (/=) :: ProgramName -> ProgramName -> Bool Source #

defaultDecodeOptions :: DecodeOptions Source #

packageConfig :: FilePath Source #

data DecodeResult Source #

Constructors

DecodeResult |

Fields

- decodeResultPackage :: Package
- decodeResultCabalVersion :: String
- decodeResultCabalFile :: FilePath
- decodeResultWarnings :: [String]

#### Instances

Instances details

Show DecodeResult Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> DecodeResult -> ShowS Source # show :: DecodeResult -> String Source # showList :: [DecodeResult] -> ShowS Source #
Eq DecodeResult Source # |
Instance details Defined in Hpack.Config Methods (==) :: DecodeResult -> DecodeResult -> Bool Source # (/=) :: DecodeResult -> DecodeResult -> Bool Source #

readPackageConfig :: DecodeOptions -> IO (Either String DecodeResult) Source #

readPackageConfigWithError :: DecodeOptions -> IO (Either HpackError DecodeResult) Source #

renamePackage :: String -> Package -> Package Source #

packageDependencies :: Package -> [(String, DependencyInfo)] Source #

package :: String -> String -> Package Source #

section :: a -> Section a Source #

data Package Source #

Constructors

Package |

Fields

- 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]

#### Instances

Instances details

Show Package Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Package -> ShowS Source # show :: Package -> String Source # showList :: [Package] -> ShowS Source #
Eq Package Source # |
Instance details Defined in Hpack.Config Methods (==) :: Package -> Package -> Bool Source # (/=) :: Package -> Package -> Bool Source #

newtype Dependencies Source #

Constructors

Dependencies |

Fields

- unDependencies :: Map String DependencyInfo

#### Instances

Instances details

Monoid Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods mempty :: Dependencies Source # mappend :: Dependencies -> Dependencies -> Dependencies Source # mconcat :: [Dependencies] -> Dependencies Source #
Semigroup Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods (<>) :: Dependencies -> Dependencies -> Dependencies Source # sconcat :: NonEmpty Dependencies -> Dependencies Source # stimes :: Integral b => b -> Dependencies -> Dependencies Source #
IsList Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Associated Types type Item Dependencies Source # Methods fromList :: [Item Dependencies] -> Dependencies Source # fromListN :: Int -> [Item Dependencies] -> Dependencies Source # toList :: Dependencies -> [Item Dependencies] Source #
Show Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods showsPrec :: Int -> Dependencies -> ShowS Source # show :: Dependencies -> String Source # showList :: [Dependencies] -> ShowS Source #
Eq Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods (==) :: Dependencies -> Dependencies -> Bool Source # (/=) :: Dependencies -> Dependencies -> Bool Source #
FromValue Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods fromValue :: Value -> Parser Dependencies Source #
type Item Dependencies Source # |
Instance details Defined in Hpack.Syntax.Dependencies type Item Dependencies = (String, DependencyInfo)

data DependencyInfo Source #

Constructors

DependencyInfo |

Fields

- dependencyInfoMixins :: [String]
- dependencyInfoVersion :: DependencyVersion

#### Instances

Instances details

Show DependencyInfo Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods showsPrec :: Int -> DependencyInfo -> ShowS Source # show :: DependencyInfo -> String Source # showList :: [DependencyInfo] -> ShowS Source #
Eq DependencyInfo Source # |
Instance details Defined in Hpack.Syntax.Dependencies Methods (==) :: DependencyInfo -> DependencyInfo -> Bool Source # (/=) :: DependencyInfo -> DependencyInfo -> Bool Source #
Ord DependencyInfo Source # |

Instance details

Defined in Hpack.Syntax.Dependencies

Methods

compare :: DependencyInfo -> DependencyInfo -> Ordering Source #

(<) :: DependencyInfo -> DependencyInfo -> Bool Source #

(<=) :: DependencyInfo -> DependencyInfo -> Bool Source #

(>) :: DependencyInfo -> DependencyInfo -> Bool Source #

(>=) :: DependencyInfo -> DependencyInfo -> Bool Source #

max :: DependencyInfo -> DependencyInfo -> DependencyInfo Source #

min :: DependencyInfo -> DependencyInfo -> DependencyInfo Source #

data VersionConstraint Source #

Constructors

AnyVersion |
VersionRange String |

#### Instances

Instances details

Show VersionConstraint Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> VersionConstraint -> ShowS Source # show :: VersionConstraint -> String Source # showList :: [VersionConstraint] -> ShowS Source #
Eq VersionConstraint Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods (==) :: VersionConstraint -> VersionConstraint -> Bool Source # (/=) :: VersionConstraint -> VersionConstraint -> Bool Source #
Ord VersionConstraint Source # |

Instance details

Defined in Hpack.Syntax.DependencyVersion

Methods

compare :: VersionConstraint -> VersionConstraint -> Ordering Source #

(<) :: VersionConstraint -> VersionConstraint -> Bool Source #

(<=) :: VersionConstraint -> VersionConstraint -> Bool Source #

(>) :: VersionConstraint -> VersionConstraint -> Bool Source #

(>=) :: VersionConstraint -> VersionConstraint -> Bool Source #

max :: VersionConstraint -> VersionConstraint -> VersionConstraint Source #

min :: VersionConstraint -> VersionConstraint -> VersionConstraint Source #

FromValue VersionConstraint Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods fromValue :: Value -> Parser VersionConstraint Source #

data DependencyVersion Source #

Constructors

DependencyVersion (Maybe SourceDependency) VersionConstraint |

#### Instances

Instances details

Show DependencyVersion Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> DependencyVersion -> ShowS Source # show :: DependencyVersion -> String Source # showList :: [DependencyVersion] -> ShowS Source #
Eq DependencyVersion Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods (==) :: DependencyVersion -> DependencyVersion -> Bool Source # (/=) :: DependencyVersion -> DependencyVersion -> Bool Source #
Ord DependencyVersion Source # |

Instance details

Defined in Hpack.Syntax.DependencyVersion

Methods

compare :: DependencyVersion -> DependencyVersion -> Ordering Source #

(<) :: DependencyVersion -> DependencyVersion -> Bool Source #

(<=) :: DependencyVersion -> DependencyVersion -> Bool Source #

(>) :: DependencyVersion -> DependencyVersion -> Bool Source #

(>=) :: DependencyVersion -> DependencyVersion -> Bool Source #

max :: DependencyVersion -> DependencyVersion -> DependencyVersion Source #

min :: DependencyVersion -> DependencyVersion -> DependencyVersion Source #

data SourceDependency Source #

Constructors

GitRef GitUrl GitRef (Maybe FilePath) |
Local FilePath |

#### Instances

Instances details

Show SourceDependency Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods showsPrec :: Int -> SourceDependency -> ShowS Source # show :: SourceDependency -> String Source # showList :: [SourceDependency] -> ShowS Source #
Eq SourceDependency Source # |
Instance details Defined in Hpack.Syntax.DependencyVersion Methods (==) :: SourceDependency -> SourceDependency -> Bool Source # (/=) :: SourceDependency -> SourceDependency -> Bool Source #
Ord SourceDependency Source # |

Instance details

Defined in Hpack.Syntax.DependencyVersion

Methods

compare :: SourceDependency -> SourceDependency -> Ordering Source #

(<) :: SourceDependency -> SourceDependency -> Bool Source #

(<=) :: SourceDependency -> SourceDependency -> Bool Source #

(>) :: SourceDependency -> SourceDependency -> Bool Source #

(>=) :: SourceDependency -> SourceDependency -> Bool Source #

max :: SourceDependency -> SourceDependency -> SourceDependency Source #

min :: SourceDependency -> SourceDependency -> SourceDependency Source #

type GitRef = String Source #

type GitUrl = String Source #

data BuildTool Source #

Constructors

BuildTool String String |
LocalBuildTool String |

#### Instances

Instances details

Show BuildTool Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> BuildTool -> ShowS Source # show :: BuildTool -> String Source # showList :: [BuildTool] -> ShowS Source #
Eq BuildTool Source # |
Instance details Defined in Hpack.Config Methods (==) :: BuildTool -> BuildTool -> Bool Source # (/=) :: BuildTool -> BuildTool -> Bool Source #
Ord BuildTool Source # |
Instance details Defined in Hpack.Config Methods compare :: BuildTool -> BuildTool -> Ordering Source # (<) :: BuildTool -> BuildTool -> Bool Source # (<=) :: BuildTool -> BuildTool -> Bool Source # (>) :: BuildTool -> BuildTool -> Bool Source # (>=) :: BuildTool -> BuildTool -> Bool Source # max :: BuildTool -> BuildTool -> BuildTool Source # min :: BuildTool -> BuildTool -> BuildTool Source #

newtype SystemBuildTools Source #

Constructors

SystemBuildTools |

Fields

- unSystemBuildTools :: Map String VersionConstraint

#### Instances

Instances details

Monoid SystemBuildTools Source # |
Instance details Defined in Hpack.Syntax.BuildTools Methods mempty :: SystemBuildTools Source # mappend :: SystemBuildTools -> SystemBuildTools -> SystemBuildTools Source # mconcat :: [SystemBuildTools] -> SystemBuildTools Source #
Semigroup SystemBuildTools Source # |
Instance details Defined in Hpack.Syntax.BuildTools Methods (<>) :: SystemBuildTools -> SystemBuildTools -> SystemBuildTools Source # sconcat :: NonEmpty SystemBuildTools -> SystemBuildTools Source # stimes :: Integral b => b -> SystemBuildTools -> SystemBuildTools Source #
Show SystemBuildTools Source # |
Instance details Defined in Hpack.Syntax.BuildTools Methods showsPrec :: Int -> SystemBuildTools -> ShowS Source # show :: SystemBuildTools -> String Source # showList :: [SystemBuildTools] -> ShowS Source #
Eq SystemBuildTools Source # |
Instance details Defined in Hpack.Syntax.BuildTools Methods (==) :: SystemBuildTools -> SystemBuildTools -> Bool Source # (/=) :: SystemBuildTools -> SystemBuildTools -> Bool Source #
FromValue SystemBuildTools Source # |
Instance details Defined in Hpack.Syntax.BuildTools Methods fromValue :: Value -> Parser SystemBuildTools Source #

type GhcOption = String Source #

data Verbatim Source #

Constructors

VerbatimLiteral String |
VerbatimObject (Map String VerbatimValue) |

#### Instances

Instances details

Show Verbatim Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Verbatim -> ShowS Source # show :: Verbatim -> String Source # showList :: [Verbatim] -> ShowS Source #
Eq Verbatim Source # |
Instance details Defined in Hpack.Config Methods (==) :: Verbatim -> Verbatim -> Bool Source # (/=) :: Verbatim -> Verbatim -> Bool Source #
FromValue Verbatim Source # |
Instance details Defined in Hpack.Config Methods fromValue :: Value -> Parser Verbatim Source #

data VerbatimValue Source #

Constructors

VerbatimString String |
VerbatimNumber Scientific |
VerbatimBool Bool |
VerbatimNull |

#### Instances

Instances details

Show VerbatimValue Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> VerbatimValue -> ShowS Source # show :: VerbatimValue -> String Source # showList :: [VerbatimValue] -> ShowS Source #
Eq VerbatimValue Source # |
Instance details Defined in Hpack.Config Methods (==) :: VerbatimValue -> VerbatimValue -> Bool Source # (/=) :: VerbatimValue -> VerbatimValue -> Bool Source #
FromValue VerbatimValue Source # |
Instance details Defined in Hpack.Config Methods fromValue :: Value -> Parser VerbatimValue Source #

verbatimValueToString :: VerbatimValue -> String Source #

data CustomSetup Source #

Constructors

CustomSetup |

Fields

- customSetupDependencies :: Dependencies

#### Instances

Instances details

Show CustomSetup Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> CustomSetup -> ShowS Source # show :: CustomSetup -> String Source # showList :: [CustomSetup] -> ShowS Source #
Eq CustomSetup Source # |
Instance details Defined in Hpack.Config Methods (==) :: CustomSetup -> CustomSetup -> Bool Source # (/=) :: CustomSetup -> CustomSetup -> Bool Source #

data Section a Source #

Constructors

Section |

Fields

- 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]
- 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]

#### Instances

Instances details

Foldable Section Source # |

Instance details

Defined in Hpack.Config

Methods

fold :: Monoid m => Section m -> m Source #

foldMap :: Monoid m => (a -> m) -> Section a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Section a -> m Source #

foldr :: (a -> b -> b) -> b -> Section a -> b Source #

foldr' :: (a -> b -> b) -> b -> Section a -> b Source #

foldl :: (b -> a -> b) -> b -> Section a -> b Source #

foldl' :: (b -> a -> b) -> b -> Section a -> b Source #

foldr1 :: (a -> a -> a) -> Section a -> a Source #

foldl1 :: (a -> a -> a) -> Section a -> a Source #

toList :: Section a -> [a] Source #

null :: Section a -> Bool Source #

length :: Section a -> Int Source #

elem :: Eq a => a -> Section a -> Bool Source #

maximum :: Ord a => Section a -> a Source #

minimum :: Ord a => Section a -> a Source #

sum :: Num a => Section a -> a Source #

product :: Num a => Section a -> a Source #

Traversable Section Source # |
Instance details Defined in Hpack.Config Methods traverse :: Applicative f => (a -> f b) -> Section a -> f (Section b) Source # sequenceA :: Applicative f => Section (f a) -> f (Section a) Source # mapM :: Monad m => (a -> m b) -> Section a -> m (Section b) Source # sequence :: Monad m => Section (m a) -> m (Section a) Source #
Functor Section Source # |
Instance details Defined in Hpack.Config Methods fmap :: (a -> b) -> Section a -> Section b Source # (<$) :: a -> Section b -> Section a Source #
Show a => Show (Section a) Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Section a -> ShowS Source # show :: Section a -> String Source # showList :: [Section a] -> ShowS Source #
Eq a => Eq (Section a) Source # |
Instance details Defined in Hpack.Config Methods (==) :: Section a -> Section a -> Bool Source # (/=) :: Section a -> Section a -> Bool Source #

data Library Source #

Constructors

Library |

Fields

- libraryExposed :: Maybe Bool
- libraryVisibility :: Maybe String
- libraryExposedModules :: [Module]
- libraryOtherModules :: [Module]
- libraryGeneratedModules :: [Module]
- libraryReexportedModules :: [String]
- librarySignatures :: [String]

#### Instances

Instances details

Show Library Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Library -> ShowS Source # show :: Library -> String Source # showList :: [Library] -> ShowS Source #
Eq Library Source # |
Instance details Defined in Hpack.Config Methods (==) :: Library -> Library -> Bool Source # (/=) :: Library -> Library -> Bool Source #

data Executable Source #

Constructors

Executable |

Fields

- executableMain :: Maybe FilePath
- executableOtherModules :: [Module]
- executableGeneratedModules :: [Module]

#### Instances

Instances details

Show Executable Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Executable -> ShowS Source # show :: Executable -> String Source # showList :: [Executable] -> ShowS Source #
Eq Executable Source # |
Instance details Defined in Hpack.Config Methods (==) :: Executable -> Executable -> Bool Source # (/=) :: Executable -> Executable -> Bool Source #

data Conditional a Source #

Constructors

Conditional |

Fields

- conditionalCondition :: Cond
- conditionalThen :: a
- conditionalElse :: Maybe a

#### Instances

Instances details

Foldable Conditional Source # |

Instance details

Defined in Hpack.Config

Methods

fold :: Monoid m => Conditional m -> m Source #

foldMap :: Monoid m => (a -> m) -> Conditional a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Conditional a -> m Source #

foldr :: (a -> b -> b) -> b -> Conditional a -> b Source #

foldr' :: (a -> b -> b) -> b -> Conditional a -> b Source #

foldl :: (b -> a -> b) -> b -> Conditional a -> b Source #

foldl' :: (b -> a -> b) -> b -> Conditional a -> b Source #

foldr1 :: (a -> a -> a) -> Conditional a -> a Source #

foldl1 :: (a -> a -> a) -> Conditional a -> a Source #

toList :: Conditional a -> [a] Source #

null :: Conditional a -> Bool Source #

length :: Conditional a -> Int Source #

elem :: Eq a => a -> Conditional a -> Bool Source #

maximum :: Ord a => Conditional a -> a Source #

minimum :: Ord a => Conditional a -> a Source #

sum :: Num a => Conditional a -> a Source #

product :: Num a => Conditional a -> a Source #

Traversable Conditional Source # |
Instance details Defined in Hpack.Config Methods traverse :: Applicative f => (a -> f b) -> Conditional a -> f (Conditional b) Source # sequenceA :: Applicative f => Conditional (f a) -> f (Conditional a) Source # mapM :: Monad m => (a -> m b) -> Conditional a -> m (Conditional b) Source # sequence :: Monad m => Conditional (m a) -> m (Conditional a) Source #
Functor Conditional Source # |
Instance details Defined in Hpack.Config Methods fmap :: (a -> b) -> Conditional a -> Conditional b Source # (<$) :: a -> Conditional b -> Conditional a Source #
Show a => Show (Conditional a) Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Conditional a -> ShowS Source # show :: Conditional a -> String Source # showList :: [Conditional a] -> ShowS Source #
Eq a => Eq (Conditional a) Source # |
Instance details Defined in Hpack.Config Methods (==) :: Conditional a -> Conditional a -> Bool Source # (/=) :: Conditional a -> Conditional a -> Bool Source #

data Cond Source #

Constructors

CondBool Bool |
CondExpression String |

#### Instances

Instances details

Show Cond Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Cond -> ShowS Source # show :: Cond -> String Source # showList :: [Cond] -> ShowS Source #
Eq Cond Source # |
Instance details Defined in Hpack.Config Methods (==) :: Cond -> Cond -> Bool Source # (/=) :: Cond -> Cond -> Bool Source #
FromValue Cond Source # |
Instance details Defined in Hpack.Config Methods fromValue :: Value -> Parser Cond Source #

data Flag Source #

Constructors

Flag |

Fields

- flagName :: String
- flagDescription :: Maybe String
- flagManual :: Bool
- flagDefault :: Bool

#### Instances

Instances details

Show Flag Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Flag -> ShowS Source # show :: Flag -> String Source # showList :: [Flag] -> ShowS Source #
Eq Flag Source # |
Instance details Defined in Hpack.Config Methods (==) :: Flag -> Flag -> Bool Source # (/=) :: Flag -> Flag -> Bool Source #

data SourceRepository Source #

Constructors

SourceRepository |

Fields

- sourceRepositoryUrl :: String
- sourceRepositorySubdir :: Maybe String

#### Instances

Instances details

Show SourceRepository Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> SourceRepository -> ShowS Source # show :: SourceRepository -> String Source # showList :: [SourceRepository] -> ShowS Source #
Eq SourceRepository Source # |
Instance details Defined in Hpack.Config Methods (==) :: SourceRepository -> SourceRepository -> Bool Source # (/=) :: SourceRepository -> SourceRepository -> Bool Source #

newtype Language Source #

Constructors

Language String |

#### Instances

Instances details

IsString Language Source # |
Instance details Defined in Hpack.Config Methods fromString :: String -> Language Source #
Show Language Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Language -> ShowS Source # show :: Language -> String Source # showList :: [Language] -> ShowS Source #
Eq Language Source # |
Instance details Defined in Hpack.Config Methods (==) :: Language -> Language -> Bool Source # (/=) :: Language -> Language -> Bool Source #
FromValue Language Source # |
Instance details Defined in Hpack.Config Methods fromValue :: Value -> Parser Language Source #

data BuildType Source #

Constructors

Simple |
Configure |
Make |
Custom |

#### Instances

Instances details

Bounded BuildType Source # |
Instance details Defined in Hpack.Config Methods minBound :: BuildType Source # maxBound :: BuildType Source #
Enum BuildType Source # |

Instance details

Defined in Hpack.Config

Methods

succ :: BuildType -> BuildType Source #

pred :: BuildType -> BuildType Source #

toEnum :: Int -> BuildType Source #

fromEnum :: BuildType -> Int Source #

enumFrom :: BuildType -> [BuildType] Source #

enumFromThen :: BuildType -> BuildType -> [BuildType] Source #

enumFromTo :: BuildType -> BuildType -> [BuildType] Source #

enumFromThenTo :: BuildType -> BuildType -> BuildType -> [BuildType] Source #

Show BuildType Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> BuildType -> ShowS Source # show :: BuildType -> String Source # showList :: [BuildType] -> ShowS Source #
Eq BuildType Source # |
Instance details Defined in Hpack.Config Methods (==) :: BuildType -> BuildType -> Bool Source # (/=) :: BuildType -> BuildType -> Bool Source #
FromValue BuildType Source # |
Instance details Defined in Hpack.Config Methods fromValue :: Value -> Parser BuildType Source #

type GhcProfOption = String Source #

type GhcjsOption = String Source #

type CppOption = String Source #

type CcOption = String Source #

type LdOption = String Source #

newtype Path Source #

Constructors

Path |

Fields

- unPath :: FilePath

#### Instances

Instances details

IsString Path Source # |
Instance details Defined in Hpack.Config Methods fromString :: String -> Path Source #
Show Path Source # |
Instance details Defined in Hpack.Config Methods showsPrec :: Int -> Path -> ShowS Source # show :: Path -> String Source # showList :: [Path] -> ShowS Source #
Eq Path Source # |
Instance details Defined in Hpack.Config Methods (==) :: Path -> Path -> Bool Source # (/=) :: Path -> Path -> Bool Source #
Ord Path Source # |
Instance details Defined in Hpack.Config Methods compare :: Path -> Path -> Ordering Source # (<) :: Path -> Path -> Bool Source # (<=) :: Path -> Path -> Bool Source # (>) :: Path -> Path -> Bool Source # (>=) :: Path -> Path -> Bool Source # max :: Path -> Path -> Path Source # min :: Path -> Path -> Path Source #

newtype Module Source #

Constructors

Module |

Fields

- unModule :: String

#### Instances

Instances details

IsString Module Source # |
Instance details Defined in Hpack.Module Methods fromString :: String -> Module Source #
Show Module Source # |
Instance details Defined in Hpack.Module Methods showsPrec :: Int -> Module -> ShowS Source # show :: Module -> String Source # showList :: [Module] -> ShowS Source #
Eq Module Source # |
Instance details Defined in Hpack.Module Methods (==) :: Module -> Module -> Bool Source # (/=) :: Module -> Module -> Bool Source #
Ord Module Source # |
Instance details Defined in Hpack.Module Methods compare :: Module -> Module -> Ordering Source # (<) :: Module -> Module -> Bool Source # (<=) :: Module -> Module -> Bool Source # (>) :: Module -> Module -> Bool Source # (>=) :: Module -> Module -> Bool Source # max :: Module -> Module -> Module Source # min :: Module -> Module -> Module Source #
FromValue Module Source # |
Instance details Defined in Hpack.Module Methods fromValue :: Value -> Parser Module Source #