-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A modern format for Haskell packages -- -- See README at https://github.com/sol/hpack#readme @package hpack @version 0.35.2 module Hpack.Error data HpackError HpackVersionNotSupported :: FilePath -> Version -> Version -> HpackError DefaultsFileNotFound :: FilePath -> HpackError DefaultsDownloadFailed :: URL -> Status -> HpackError CycleInDefaults :: [FilePath] -> HpackError ParseError :: String -> HpackError DecodeValueError :: FilePath -> String -> HpackError formatHpackError :: ProgramName -> HpackError -> String newtype ProgramName ProgramName :: String -> ProgramName [unProgramName] :: ProgramName -> String type URL = String -- | HTTP Status. -- -- Only the statusCode is used for comparisons. -- -- Please use mkStatus to create status codes from code and -- message, or the Enum instance or the status code constants -- (like ok200). There might be additional record members in the -- future. -- -- Note that the Show instance is only for debugging. data Status Status :: Int -> ByteString -> Status [statusCode] :: Status -> Int [statusMessage] :: Status -> ByteString formatStatus :: Status -> String instance GHC.Show.Show Hpack.Error.HpackError instance GHC.Classes.Eq Hpack.Error.HpackError instance GHC.Show.Show Hpack.Error.ProgramName instance GHC.Classes.Eq Hpack.Error.ProgramName instance Data.String.IsString Hpack.Error.ProgramName module Hpack.Yaml decodeYaml :: FilePath -> IO (Either String ([String], Value)) decodeYamlWithParseError :: FilePath -> IO (Either ParseException ([String], Value)) data ParseException formatYamlParseError :: FilePath -> ParseException -> String formatWarning :: FilePath -> Warning -> String class FromValue a fromValue :: FromValue a => Value -> Parser a fromValue :: forall d m. (FromValue a, Generic a, Rep a ~ D1 d m, Datatype d, GenericDecode (Rep a)) => Value -> Parser a data Parser a type Result a = Either String (a, [String], [(String, String)]) decodeValue :: FromValue a => Value -> Result a -- | Representable types of kind *. This class is derivable in GHC -- with the DeriveGeneric flag on. -- -- A Generic instance must satisfy the following laws: -- --
--   from . toid
--   to . fromid
--   
class Generic a class GenericDecode f genericFromValue :: forall a d m. (Generic a, Rep a ~ D1 d m, Datatype d, GenericDecode (Rep a)) => Value -> Parser a data Options Options :: (String -> String) -> Options [optionsRecordSelectorModifier] :: Options -> String -> String genericFromValueWith :: (Generic a, GenericDecode (Rep a)) => Options -> Value -> Parser a typeMismatch :: String -> Value -> Parser a withObject :: (Object -> Parser a) -> Value -> Parser a withText :: (Text -> Parser a) -> Value -> Parser a withString :: (String -> Parser a) -> Value -> Parser a withArray :: (Array -> Parser a) -> Value -> Parser a withNumber :: (Scientific -> Parser a) -> Value -> Parser a withBool :: (Bool -> Parser a) -> Value -> Parser a parseArray :: (Value -> Parser a) -> Array -> Parser [a] traverseObject :: (Value -> Parser a) -> Object -> Parser [(Key, a)] (.:) :: FromValue a => Object -> Key -> Parser a (.:?) :: FromValue a => Object -> Key -> Parser (Maybe a) data Key -- | A JSON value represented as a Haskell value. data Value Object :: !Object -> Value Array :: !Array -> Value String :: !Text -> Value Number :: !Scientific -> Value Bool :: !Bool -> Value Null :: Value -- | A JSON "object" (key/value map). type Object = KeyMap Value -- | A JSON "array" (sequence). type Array = Vector Value newtype Alias (deprecated :: Bool) (alias :: Symbol) a Alias :: a -> Alias (deprecated :: Bool) (alias :: Symbol) a unAlias :: Alias deprecated alias a -> a module Hpack.Config data DecodeOptions DecodeOptions :: ProgramName -> FilePath -> Maybe FilePath -> (FilePath -> IO (Either String ([String], Value))) -> (FilePath -> ParseException -> String) -> DecodeOptions [decodeOptionsProgramName] :: DecodeOptions -> ProgramName [decodeOptionsTarget] :: DecodeOptions -> FilePath [decodeOptionsUserDataDir] :: DecodeOptions -> Maybe FilePath [decodeOptionsDecode] :: DecodeOptions -> FilePath -> IO (Either String ([String], Value)) [decodeOptionsFormatYamlParseError] :: DecodeOptions -> FilePath -> ParseException -> String newtype ProgramName ProgramName :: String -> ProgramName [unProgramName] :: ProgramName -> String defaultDecodeOptions :: DecodeOptions packageConfig :: FilePath data DecodeResult DecodeResult :: Package -> String -> FilePath -> [String] -> DecodeResult [decodeResultPackage] :: DecodeResult -> Package [decodeResultCabalVersion] :: DecodeResult -> String [decodeResultCabalFile] :: DecodeResult -> FilePath [decodeResultWarnings] :: DecodeResult -> [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 :: String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> [String] -> [String] -> [String] -> BuildType -> Maybe String -> [FilePath] -> [String] -> [Flag] -> [Path] -> [Path] -> [Path] -> Maybe FilePath -> Maybe SourceRepository -> Maybe CustomSetup -> Maybe (Section Library) -> Map String (Section Library) -> Map String (Section Executable) -> Map String (Section Executable) -> Map String (Section Executable) -> [Verbatim] -> Package [packageName] :: Package -> String [packageVersion] :: Package -> String [packageSynopsis] :: Package -> Maybe String [packageDescription] :: Package -> Maybe String [packageHomepage] :: Package -> Maybe String [packageBugReports] :: Package -> Maybe String [packageCategory] :: Package -> Maybe String [packageStability] :: Package -> Maybe String [packageAuthor] :: Package -> [String] [packageMaintainer] :: Package -> [String] [packageCopyright] :: Package -> [String] [packageBuildType] :: Package -> BuildType [packageLicense] :: Package -> Maybe String [packageLicenseFile] :: Package -> [FilePath] [packageTestedWith] :: Package -> [String] [packageFlags] :: Package -> [Flag] [packageExtraSourceFiles] :: Package -> [Path] [packageExtraDocFiles] :: Package -> [Path] [packageDataFiles] :: Package -> [Path] [packageDataDir] :: Package -> Maybe FilePath [packageSourceRepository] :: Package -> Maybe SourceRepository [packageCustomSetup] :: Package -> Maybe CustomSetup [packageLibrary] :: Package -> Maybe (Section Library) [packageInternalLibraries] :: Package -> Map String (Section Library) [packageExecutables] :: Package -> Map String (Section Executable) [packageTests] :: Package -> Map String (Section Executable) [packageBenchmarks] :: Package -> Map String (Section Executable) [packageVerbatim] :: Package -> [Verbatim] newtype Dependencies Dependencies :: Map String DependencyInfo -> Dependencies [unDependencies] :: Dependencies -> Map String DependencyInfo data DependencyInfo DependencyInfo :: [String] -> DependencyVersion -> DependencyInfo [dependencyInfoMixins] :: DependencyInfo -> [String] [dependencyInfoVersion] :: DependencyInfo -> DependencyVersion data VersionConstraint AnyVersion :: VersionConstraint VersionRange :: String -> VersionConstraint data DependencyVersion DependencyVersion :: Maybe SourceDependency -> VersionConstraint -> DependencyVersion data SourceDependency GitRef :: GitUrl -> GitRef -> Maybe FilePath -> SourceDependency Local :: FilePath -> SourceDependency type GitRef = String type GitUrl = String data BuildTool BuildTool :: String -> String -> BuildTool LocalBuildTool :: String -> BuildTool newtype SystemBuildTools SystemBuildTools :: Map String VersionConstraint -> SystemBuildTools [unSystemBuildTools] :: SystemBuildTools -> Map String VersionConstraint type GhcOption = String data Verbatim VerbatimLiteral :: String -> Verbatim VerbatimObject :: Map String VerbatimValue -> Verbatim data VerbatimValue VerbatimString :: String -> VerbatimValue VerbatimNumber :: Scientific -> VerbatimValue VerbatimBool :: Bool -> VerbatimValue VerbatimNull :: VerbatimValue verbatimValueToString :: VerbatimValue -> String data CustomSetup CustomSetup :: Dependencies -> CustomSetup [customSetupDependencies] :: CustomSetup -> Dependencies data Section a Section :: a -> [FilePath] -> Dependencies -> [String] -> [String] -> [String] -> Maybe Language -> [GhcOption] -> [GhcProfOption] -> [GhcOption] -> [GhcjsOption] -> [CppOption] -> [CcOption] -> [Path] -> [CxxOption] -> [Path] -> [Path] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [LdOption] -> Maybe Bool -> [Conditional (Section a)] -> Map BuildTool DependencyVersion -> SystemBuildTools -> [Verbatim] -> Section a [sectionData] :: Section a -> a [sectionSourceDirs] :: Section a -> [FilePath] [sectionDependencies] :: Section a -> Dependencies [sectionPkgConfigDependencies] :: Section a -> [String] [sectionDefaultExtensions] :: Section a -> [String] [sectionOtherExtensions] :: Section a -> [String] [sectionLanguage] :: Section a -> Maybe Language [sectionGhcOptions] :: Section a -> [GhcOption] [sectionGhcProfOptions] :: Section a -> [GhcProfOption] [sectionGhcSharedOptions] :: Section a -> [GhcOption] [sectionGhcjsOptions] :: Section a -> [GhcjsOption] [sectionCppOptions] :: Section a -> [CppOption] [sectionCcOptions] :: Section a -> [CcOption] [sectionCSources] :: Section a -> [Path] [sectionCxxOptions] :: Section a -> [CxxOption] [sectionCxxSources] :: Section a -> [Path] [sectionJsSources] :: Section a -> [Path] [sectionExtraLibDirs] :: Section a -> [FilePath] [sectionExtraLibraries] :: Section a -> [FilePath] [sectionExtraFrameworksDirs] :: Section a -> [FilePath] [sectionFrameworks] :: Section a -> [FilePath] [sectionIncludeDirs] :: Section a -> [FilePath] [sectionInstallIncludes] :: Section a -> [FilePath] [sectionLdOptions] :: Section a -> [LdOption] [sectionBuildable] :: Section a -> Maybe Bool [sectionConditionals] :: Section a -> [Conditional (Section a)] [sectionBuildTools] :: Section a -> Map BuildTool DependencyVersion [sectionSystemBuildTools] :: Section a -> SystemBuildTools [sectionVerbatim] :: Section a -> [Verbatim] data Library Library :: Maybe Bool -> Maybe String -> [Module] -> [Module] -> [Module] -> [String] -> [String] -> Library [libraryExposed] :: Library -> Maybe Bool [libraryVisibility] :: Library -> Maybe String [libraryExposedModules] :: Library -> [Module] [libraryOtherModules] :: Library -> [Module] [libraryGeneratedModules] :: Library -> [Module] [libraryReexportedModules] :: Library -> [String] [librarySignatures] :: Library -> [String] data Executable Executable :: Maybe FilePath -> [Module] -> [Module] -> Executable [executableMain] :: Executable -> Maybe FilePath [executableOtherModules] :: Executable -> [Module] [executableGeneratedModules] :: Executable -> [Module] data Conditional a Conditional :: Cond -> a -> Maybe a -> Conditional a [conditionalCondition] :: Conditional a -> Cond [conditionalThen] :: Conditional a -> a [conditionalElse] :: Conditional a -> Maybe a data Cond CondBool :: Bool -> Cond CondExpression :: String -> Cond data Flag Flag :: String -> Maybe String -> Bool -> Bool -> Flag [flagName] :: Flag -> String [flagDescription] :: Flag -> Maybe String [flagManual] :: Flag -> Bool [flagDefault] :: Flag -> Bool data SourceRepository SourceRepository :: String -> Maybe String -> SourceRepository [sourceRepositoryUrl] :: SourceRepository -> String [sourceRepositorySubdir] :: SourceRepository -> Maybe String newtype Language Language :: String -> Language data BuildType Simple :: BuildType Configure :: BuildType Make :: BuildType Custom :: BuildType type GhcProfOption = String type GhcjsOption = String type CppOption = String type CcOption = String type LdOption = String newtype Path Path :: FilePath -> Path [unPath] :: Path -> FilePath newtype Module Module :: String -> Module [unModule] :: Module -> String instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.CustomSetupSection instance GHC.Generics.Generic Hpack.Config.CustomSetupSection instance GHC.Show.Show Hpack.Config.CustomSetupSection instance GHC.Classes.Eq Hpack.Config.CustomSetupSection instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.LibrarySection instance GHC.Generics.Generic Hpack.Config.LibrarySection instance GHC.Show.Show Hpack.Config.LibrarySection instance GHC.Classes.Eq Hpack.Config.LibrarySection instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.ExecutableSection instance GHC.Generics.Generic Hpack.Config.ExecutableSection instance GHC.Show.Show Hpack.Config.ExecutableSection instance GHC.Classes.Eq Hpack.Config.ExecutableSection instance GHC.Show.Show Hpack.Config.VerbatimValue instance GHC.Classes.Eq Hpack.Config.VerbatimValue instance GHC.Show.Show Hpack.Config.Verbatim instance GHC.Classes.Eq Hpack.Config.Verbatim instance GHC.Show.Show Hpack.Config.Cond instance GHC.Classes.Eq Hpack.Config.Cond instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.Condition instance GHC.Generics.Generic Hpack.Config.Condition instance GHC.Show.Show Hpack.Config.Condition instance GHC.Classes.Eq Hpack.Config.Condition instance GHC.Show.Show Hpack.Config.Empty instance GHC.Classes.Eq Hpack.Config.Empty instance GHC.Show.Show Hpack.Config.Language instance GHC.Classes.Eq Hpack.Config.Language instance GHC.Generics.Generic (Hpack.Config.ThenElse cSources cxxSources jsSources a) instance GHC.Generics.Generic (Hpack.Config.CommonOptions cSources cxxSources jsSources a) instance GHC.Base.Functor (Hpack.Config.CommonOptions cSources cxxSources jsSources) instance GHC.Enum.Bounded Hpack.Config.BuildType instance GHC.Enum.Enum Hpack.Config.BuildType instance GHC.Show.Show Hpack.Config.BuildType instance GHC.Classes.Eq Hpack.Config.BuildType instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.DefaultsConfig instance GHC.Generics.Generic Hpack.Config.DefaultsConfig instance GHC.Show.Show Hpack.Config.CustomSetup instance GHC.Classes.Eq Hpack.Config.CustomSetup instance GHC.Show.Show Hpack.Config.Library instance GHC.Classes.Eq Hpack.Config.Library instance GHC.Show.Show Hpack.Config.Executable instance GHC.Classes.Eq Hpack.Config.Executable instance GHC.Classes.Ord Hpack.Config.BuildTool instance GHC.Classes.Eq Hpack.Config.BuildTool instance GHC.Show.Show Hpack.Config.BuildTool instance Data.Traversable.Traversable Hpack.Config.Conditional instance Data.Foldable.Foldable Hpack.Config.Conditional instance GHC.Base.Functor Hpack.Config.Conditional instance GHC.Show.Show a => GHC.Show.Show (Hpack.Config.Conditional a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Hpack.Config.Conditional a) instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.FlagSection instance GHC.Generics.Generic Hpack.Config.FlagSection instance GHC.Show.Show Hpack.Config.FlagSection instance GHC.Classes.Eq Hpack.Config.FlagSection instance GHC.Generics.Generic (Hpack.Config.PackageConfig_ library executable) instance GHC.Show.Show Hpack.Config.Flag instance GHC.Classes.Eq Hpack.Config.Flag instance GHC.Show.Show Hpack.Config.SourceRepository instance GHC.Classes.Eq Hpack.Config.SourceRepository instance GHC.Classes.Ord Hpack.Config.Path instance GHC.Show.Show Hpack.Config.Path instance GHC.Classes.Eq Hpack.Config.Path instance Data.Traversable.Traversable Hpack.Config.Section instance Data.Foldable.Foldable Hpack.Config.Section instance GHC.Base.Functor Hpack.Config.Section instance GHC.Show.Show a => GHC.Show.Show (Hpack.Config.Section a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Hpack.Config.Section a) instance GHC.Show.Show Hpack.Config.Package instance GHC.Classes.Eq Hpack.Config.Package instance GHC.Show.Show Hpack.Config.DecodeResult instance GHC.Classes.Eq Hpack.Config.DecodeResult instance Data.String.IsString Hpack.Config.Path instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.ParsePackageConfig instance Data.Aeson.Config.FromValue.FromValue a => Data.Aeson.Config.FromValue.FromValue (Hpack.Config.CheckSpecVersion a) instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.ParseSpecVersion instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.GitHub instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.PackageVersion instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.BuildType instance Data.Aeson.Config.FromValue.FromValue a => Data.Aeson.Config.FromValue.FromValue (Hpack.Config.ParseCommonOptions a) instance Data.Aeson.Config.FromValue.FromValue a => Data.Aeson.Config.FromValue.FromValue (Hpack.Config.ParseConditionalSection a) instance Data.Aeson.Config.FromValue.FromValue a => Data.Aeson.Config.FromValue.FromValue (Hpack.Config.ParseThenElse a) instance (GHC.Base.Semigroup cSources, GHC.Base.Semigroup cxxSources, GHC.Base.Semigroup jsSources, GHC.Base.Monoid cSources, GHC.Base.Monoid cxxSources, GHC.Base.Monoid jsSources) => GHC.Base.Monoid (Hpack.Config.CommonOptions cSources cxxSources jsSources a) instance (GHC.Base.Semigroup cSources, GHC.Base.Semigroup cxxSources, GHC.Base.Semigroup jsSources) => GHC.Base.Semigroup (Hpack.Config.CommonOptions cSources cxxSources jsSources a) instance GHC.Base.Functor (Hpack.Config.ConditionalSection cSources cxxSources jsSources) instance GHC.Base.Functor (Hpack.Config.ThenElse cSources cxxSources jsSources) instance Data.String.IsString Hpack.Config.Language instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.Language instance GHC.Base.Monoid Hpack.Config.Empty instance GHC.Base.Semigroup Hpack.Config.Empty instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.Empty instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.Cond instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.Verbatim instance Data.Aeson.Config.FromValue.FromValue Hpack.Config.VerbatimValue instance GHC.Base.Monoid Hpack.Config.ExecutableSection instance GHC.Base.Semigroup Hpack.Config.ExecutableSection instance GHC.Base.Monoid Hpack.Config.LibrarySection instance GHC.Base.Semigroup Hpack.Config.LibrarySection module Hpack.Render renderPackage :: [String] -> Package -> String renderPackageWith :: RenderSettings -> Alignment -> [String] -> [(String, [String])] -> Package -> String defaultRenderSettings :: RenderSettings data RenderSettings RenderSettings :: Int -> Alignment -> CommaStyle -> RenderSettings [renderSettingsIndentation] :: RenderSettings -> Int [renderSettingsFieldAlignment] :: RenderSettings -> Alignment [renderSettingsCommaStyle] :: RenderSettings -> CommaStyle newtype Alignment Alignment :: Int -> Alignment data CommaStyle LeadingCommas :: CommaStyle TrailingCommas :: CommaStyle module Hpack version :: Version hpack :: Verbose -> Options -> IO () hpackResult :: Options -> IO Result hpackResultWithError :: Options -> IO (Either HpackError Result) printResult :: Verbose -> Result -> IO () data Result Result :: [String] -> String -> Status -> Result [resultWarnings] :: Result -> [String] [resultCabalFile] :: Result -> String [resultStatus] :: Result -> Status data Status Generated :: Status ExistingCabalFileWasModifiedManually :: Status AlreadyGeneratedByNewerHpack :: Status OutputUnchanged :: Status defaultOptions :: Options setProgramName :: ProgramName -> Options -> Options setTarget :: FilePath -> Options -> Options setDecode :: (FilePath -> IO (Either String ([String], Value))) -> Options -> Options -- | This is used to format any ParseExceptions encountered during -- decoding of defaults. -- -- Note that: -- --
    --
  1. This is not used to format ParseExceptions encountered -- during decoding of the main package.yaml. To customize this -- you have to set a custom decode function.
  2. --
  3. Some of the constructors of ParseException are never -- produced by Hpack (e.g. AesonException as Hpack uses it's own -- mechanism to decode Values).
  4. --
-- -- Example: -- --
--   example :: IO (Either HpackError Result)
--   example = hpackResultWithError options
--     where
--       options :: Options
--       options = setCustomYamlParseErrorFormat format defaultOptions
--   
--       format :: FilePath -> ParseException -> String
--       format file err = file ++ ": " ++ displayException err
--   
--   setCustomYamlParseErrorFormat :: (FilePath -> ParseException -> String) -> Options -> Options
--   setCustomYamlParseErrorFormat format = setDecode decode >>> setFormatYamlParseError format
--     where
--       decode :: FilePath -> IO (Either String ([String], Value))
--       decode file = first (format file) <$> decodeYamlWithParseError file
--   
setFormatYamlParseError :: (FilePath -> ParseException -> String) -> Options -> Options getOptions :: FilePath -> [String] -> IO (Maybe (Verbose, Options)) data Verbose Verbose :: Verbose NoVerbose :: Verbose data Options Options :: DecodeOptions -> Force -> GenerateHashStrategy -> Bool -> Options [optionsDecodeOptions] :: Options -> DecodeOptions [optionsForce] :: Options -> Force [optionsGenerateHashStrategy] :: Options -> GenerateHashStrategy [optionsToStdout] :: Options -> Bool data Force Force :: Force NoForce :: Force data GenerateHashStrategy ForceHash :: GenerateHashStrategy ForceNoHash :: GenerateHashStrategy PreferHash :: GenerateHashStrategy PreferNoHash :: GenerateHashStrategy instance GHC.Show.Show Hpack.GenerateHashStrategy instance GHC.Classes.Eq Hpack.GenerateHashStrategy instance GHC.Show.Show Hpack.Status instance GHC.Classes.Eq Hpack.Status instance GHC.Show.Show Hpack.Result instance GHC.Classes.Eq Hpack.Result