hpack-0.16.0: An alternative format for Haskell packages

Safe Haskell | None
Language | Haskell2010

Hpack.Config

# Documentation

packageConfig :: FilePath #

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

renamePackage :: String -> Package -> Package #

packageDependencies :: Package -> [Dependency] #

package :: String -> String -> Package #

section :: a -> Section a #

data Package #

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

Instances

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

data Dependency #

Constructors

Dependency |
Fields dependencyName :: String dependencyGitRef :: Maybe AddSource

Instances

Eq Dependency # |
Methods (==) :: Dependency -> Dependency -> Bool # (/=) :: Dependency -> Dependency -> Bool #
Ord Dependency # |
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 # |
Methods showsPrec :: Int -> Dependency -> ShowS # show :: Dependency -> String # showList :: [Dependency] -> ShowS #
IsString Dependency # |
Methods fromString :: String -> Dependency #
Generic Dependency # |
Associated Types type Rep Dependency :: * -> * # Methods from :: Dependency -> Rep Dependency x # to :: Rep Dependency x -> Dependency #
FromJSON Dependency # |
Methods parseJSON :: Value -> Parser Dependency # parseJSONList :: Value -> Parser [Dependency] #
type Rep Dependency # |
type Rep Dependency = D1 (MetaData "Dependency" "Hpack.Config" "hpack-0.16.0-BEvZ4oIrfkYI5A9ytDcYFt" 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 #

Constructors

GitRef GitUrl GitRef (Maybe FilePath) |
Local FilePath |

Instances

Eq AddSource # |
Methods (==) :: AddSource -> AddSource -> Bool # (/=) :: AddSource -> AddSource -> Bool #
Ord AddSource # |
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 # |
Methods showsPrec :: Int -> AddSource -> ShowS # show :: AddSource -> String # showList :: [AddSource] -> ShowS #

type GitUrl = String #

type GitRef = String #

type GhcOption = String #

data Section a #

Constructors

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

Instances

Functor Section # |
Methods fmap :: (a -> b) -> Section a -> Section b # (<$) :: a -> Section b -> Section a #
Foldable Section # |
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 # |
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) # |
Methods (==) :: Section a -> Section a -> Bool # (/=) :: Section a -> Section a -> Bool #
Show a => Show (Section a) # |
Methods showsPrec :: Int -> Section a -> ShowS # show :: Section a -> String # showList :: [Section a] -> ShowS #

data Library #

Constructors

Library |
Fields libraryExposed :: Maybe Bool libraryExposedModules :: [String] libraryOtherModules :: [String] libraryReexportedModules :: [String]

Instances

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

data Executable #

Constructors

Executable |
Fields executableName :: String executableMain :: FilePath executableOtherModules :: [String]

Instances

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

data Conditional #

Constructors

Conditional |
Fields conditionalCondition :: String conditionalThen :: Section () conditionalElse :: Maybe (Section ())

Instances

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

data Flag #

Constructors

Flag |
Fields flagName :: String flagDescription :: Maybe String flagManual :: Bool flagDefault :: Bool

Instances

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

data SourceRepository #

Constructors

SourceRepository |
Fields sourceRepositoryUrl :: String sourceRepositorySubdir :: Maybe String

Instances

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