hpack-0.18.1: An alternative format for Haskell packages

Safe Haskell | None
Language | Haskell2010

Hpack.Config

# Documentation

packageConfig :: FilePath Source #

readPackageConfig :: FilePath -> IO (Either String ([String], Package)) Source #

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

packageDependencies :: Package -> [Dependency] 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 :: Maybe String
- packageFlags :: [Flag]
- packageExtraSourceFiles :: [FilePath]
- packageDataFiles :: [FilePath]
- packageSourceRepository :: Maybe SourceRepository
- packageCustomSetup :: Maybe CustomSetup
- packageLibrary :: Maybe (Section Library)
- packageExecutables :: [Section Executable]
- packageTests :: [Section Executable]
- packageBenchmarks :: [Section Executable]

Instances

Eq Package Source # |
Methods (==) :: Package -> Package -> Bool # (/=) :: Package -> Package -> Bool #
Show Package Source # |
Methods showsPrec :: Int -> Package -> ShowS # show :: Package -> String # showList :: [Package] -> ShowS #

data Dependency Source #

Constructors

Dependency |

Fields

- dependencyName :: String
- dependencyGitRef :: Maybe AddSource

Instances

Eq Dependency Source # |
Methods (==) :: Dependency -> Dependency -> Bool # (/=) :: Dependency -> Dependency -> Bool #
Ord Dependency Source # |
Methods compare :: Dependency -> Dependency -> Ordering # (<) :: Dependency -> Dependency -> Bool # (<=) :: Dependency -> Dependency -> Bool # (>) :: Dependency -> Dependency -> Bool # (>=) :: Dependency -> Dependency -> Bool # max :: Dependency -> Dependency -> Dependency # min :: Dependency -> Dependency -> Dependency #
Show Dependency Source # |
Methods showsPrec :: Int -> Dependency -> ShowS # show :: Dependency -> String # showList :: [Dependency] -> ShowS #
IsString Dependency Source # |
Methods fromString :: String -> Dependency #
Generic Dependency Source # |
Associated Types type Rep Dependency :: * -> * # Methods from :: Dependency -> Rep Dependency x # to :: Rep Dependency x -> Dependency #
FromJSON Dependency Source # |
Methods parseJSON :: Value -> Parser Dependency # parseJSONList :: Value -> Parser [Dependency] #
type Rep Dependency Source # |
type Rep Dependency = D1 (MetaData "Dependency" "Hpack.Config" "hpack-0.18.1-BPCcYHlrGbfBY9dLK6rWy4" False) (C1 (MetaCons "Dependency" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "dependencyName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Just Symbol "dependencyGitRef") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AddSource)))))

data AddSource Source #

Constructors

GitRef GitUrl GitRef (Maybe FilePath) |
Local FilePath |

Instances

Eq AddSource Source # |
Methods (==) :: AddSource -> AddSource -> Bool # (/=) :: AddSource -> AddSource -> Bool #
Ord AddSource Source # |
Methods compare :: AddSource -> AddSource -> Ordering # (<) :: AddSource -> AddSource -> Bool # (<=) :: AddSource -> AddSource -> Bool # (>) :: AddSource -> AddSource -> Bool # (>=) :: AddSource -> AddSource -> Bool # max :: AddSource -> AddSource -> AddSource # min :: AddSource -> AddSource -> AddSource #
Show AddSource Source # |
Methods showsPrec :: Int -> AddSource -> ShowS # show :: AddSource -> String # showList :: [AddSource] -> ShowS #

type GitUrl = String Source #

type GitRef = String Source #

type GhcOption = String Source #

data CustomSetup Source #

Constructors

CustomSetup |

Fields

- customSetupDependencies :: [Dependency]

Instances

Eq CustomSetup Source # |
Methods (==) :: CustomSetup -> CustomSetup -> Bool # (/=) :: CustomSetup -> CustomSetup -> Bool #
Show CustomSetup Source # |
Methods showsPrec :: Int -> CustomSetup -> ShowS # show :: CustomSetup -> String # showList :: [CustomSetup] -> ShowS #

data Section a Source #

Constructors

Section |

Fields

- sectionData :: a
- sectionSourceDirs :: [FilePath]
- sectionDependencies :: [Dependency]
- sectionDefaultExtensions :: [String]
- sectionOtherExtensions :: [String]
- sectionGhcOptions :: [GhcOption]
- sectionGhcProfOptions :: [GhcProfOption]
- sectionGhcjsOptions :: [GhcjsOption]
- sectionCppOptions :: [CppOption]
- sectionCcOptions :: [CcOption]
- sectionCSources :: [FilePath]
- sectionJsSources :: [FilePath]
- sectionExtraLibDirs :: [FilePath]
- sectionExtraLibraries :: [FilePath]
- sectionIncludeDirs :: [FilePath]
- sectionInstallIncludes :: [FilePath]
- sectionLdOptions :: [LdOption]
- sectionBuildable :: Maybe Bool
- sectionConditionals :: [Conditional]
- sectionBuildTools :: [Dependency]

Instances

Functor Section Source # |
Methods fmap :: (a -> b) -> Section a -> Section b # (<$) :: a -> Section b -> Section a #
Foldable Section Source # |

Methods

fold :: Monoid m => Section m -> 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 #

toList :: Section a -> [a] #

null :: Section a -> Bool #

length :: Section a -> Int #

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

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

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

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

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

Traversable Section Source # |
Methods traverse :: Applicative f => (a -> f b) -> Section a -> f (Section b) # sequenceA :: Applicative f => Section (f a) -> f (Section a) # mapM :: Monad m => (a -> m b) -> Section a -> m (Section b) # sequence :: Monad m => Section (m a) -> m (Section a) #
Eq a => Eq (Section a) Source # |
Methods (==) :: Section a -> Section a -> Bool # (/=) :: Section a -> Section a -> Bool #
Show a => Show (Section a) Source # |
Methods showsPrec :: Int -> Section a -> ShowS # show :: Section a -> String # showList :: [Section a] -> ShowS #

data Library Source #

Constructors

Library |

Fields

- libraryExposed :: Maybe Bool
- libraryExposedModules :: [String]
- libraryOtherModules :: [String]
- libraryReexportedModules :: [String]

Instances

Eq Library Source # |
Methods (==) :: Library -> Library -> Bool # (/=) :: Library -> Library -> Bool #
Show Library Source # |
Methods showsPrec :: Int -> Library -> ShowS # show :: Library -> String # showList :: [Library] -> ShowS #

data Executable Source #

Constructors

Executable |

Fields

- executableName :: String
- executableMain :: FilePath
- executableOtherModules :: [String]

Instances

Eq Executable Source # |
Methods (==) :: Executable -> Executable -> Bool # (/=) :: Executable -> Executable -> Bool #
Show Executable Source # |
Methods showsPrec :: Int -> Executable -> ShowS # show :: Executable -> String # showList :: [Executable] -> ShowS #

data Conditional Source #

Constructors

Conditional |

Fields

- conditionalCondition :: String
- conditionalThen :: Section ()
- conditionalElse :: Maybe (Section ())

Instances

Eq Conditional Source # |
Methods (==) :: Conditional -> Conditional -> Bool # (/=) :: Conditional -> Conditional -> Bool #
Show Conditional Source # |
Methods showsPrec :: Int -> Conditional -> ShowS # show :: Conditional -> String # showList :: [Conditional] -> ShowS #

data Flag Source #

Constructors

Flag |

Fields

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

Instances

Eq Flag Source # |
Methods (==) :: Flag -> Flag -> Bool # (/=) :: Flag -> Flag -> Bool #
Show Flag Source # |
Methods showsPrec :: Int -> Flag -> ShowS # show :: Flag -> String # showList :: [Flag] -> ShowS #

data SourceRepository Source #

Constructors

SourceRepository |

Fields

- sourceRepositoryUrl :: String
- sourceRepositorySubdir :: Maybe String

Instances

Eq SourceRepository Source # |
Methods (==) :: SourceRepository -> SourceRepository -> Bool # (/=) :: SourceRepository -> SourceRepository -> Bool #
Show SourceRepository Source # |
Methods showsPrec :: Int -> SourceRepository -> ShowS # show :: SourceRepository -> String # showList :: [SourceRepository] -> ShowS #