hpack 0.39.0 → 0.39.1
raw patch · 5 files changed
+23/−42 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Hpack.Config: [sectionMhsOptions] :: Section a -> [GhcOption]
- Hpack.Config: Section :: a -> [FilePath] -> Dependencies -> [String] -> [String] -> [String] -> Maybe Language -> [GhcOption] -> [GhcProfOption] -> [GhcOption] -> [GhcjsOption] -> [CppOption] -> [AsmOption] -> [Path] -> [CcOption] -> [Path] -> [CxxOption] -> [Path] -> [Path] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [LdOption] -> Maybe Bool -> [Conditional (Section a)] -> Map BuildTool DependencyVersion -> SystemBuildTools -> [Verbatim] -> Section a
+ Hpack.Config: Section :: a -> [FilePath] -> Dependencies -> [String] -> [String] -> [String] -> Maybe Language -> [GhcOption] -> [GhcOption] -> [GhcProfOption] -> [GhcOption] -> [GhcjsOption] -> [CppOption] -> [AsmOption] -> [Path] -> [CcOption] -> [Path] -> [CxxOption] -> [Path] -> [Path] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [LdOption] -> Maybe Bool -> [Conditional (Section a)] -> Map BuildTool DependencyVersion -> SystemBuildTools -> [Verbatim] -> Section a
Files
- CHANGELOG.md +3/−0
- hpack.cabal +2/−2
- resources/test/hpack.cabal +2/−2
- src/Hpack/Config.hs +6/−1
- src/Hpack/Render.hs +10/−37
CHANGELOG.md view
@@ -1,3 +1,6 @@+## Changes in 0.39.1+ - Add support for `mhs-options` (MicroHs)+ ## Changes in 0.39.0 - Handle multi-line values for the `description` field of `flags` (see #623) and other fields
hpack.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.38.1.+-- This file has been generated from package.yaml by hpack version 0.38.3. -- -- see: https://github.com/sol/hpack name: hpack-version: 0.39.0+version: 0.39.1 synopsis: A modern format for Haskell packages description: See README at <https://github.com/sol/hpack#readme> category: Development
resources/test/hpack.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.38.1.+-- This file has been generated from package.yaml by hpack version 0.38.3. -- -- see: https://github.com/sol/hpack name: hpack-version: 0.39.0+version: 0.39.1 synopsis: A modern format for Haskell packages description: See README at <https://github.com/sol/hpack#readme> category: Development
src/Hpack/Config.hs view
@@ -201,7 +201,7 @@ deps xs = [(name, info) | (name, info) <- (Map.toList . unDependencies . sectionDependencies) xs] section :: a -> Section a-section a = Section a [] mempty [] [] [] Nothing [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] mempty mempty []+section a = Section a [] mempty [] [] [] Nothing [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] mempty mempty [] packageConfig :: FilePath packageConfig = "package.yaml"@@ -288,6 +288,7 @@ , commonOptionsDefaultExtensions :: Maybe (List String) , commonOptionsOtherExtensions :: Maybe (List String) , commonOptionsLanguage :: Alias 'True "default-language" (Last (Maybe Language))+, commonOptionsMhsOptions :: Maybe (List GhcOption) , commonOptionsGhcOptions :: Maybe (List GhcOption) , commonOptionsGhcProfOptions :: Maybe (List GhcProfOption) , commonOptionsGhcSharedOptions :: Maybe (List GhcOption)@@ -325,6 +326,7 @@ , commonOptionsDefaultExtensions = Nothing , commonOptionsOtherExtensions = Nothing , commonOptionsLanguage = mempty+ , commonOptionsMhsOptions = Nothing , commonOptionsGhcOptions = Nothing , commonOptionsGhcProfOptions = Nothing , commonOptionsGhcSharedOptions = Nothing@@ -360,6 +362,7 @@ , commonOptionsDefaultExtensions = commonOptionsDefaultExtensions a <> commonOptionsDefaultExtensions b , commonOptionsOtherExtensions = commonOptionsOtherExtensions a <> commonOptionsOtherExtensions b , commonOptionsLanguage = commonOptionsLanguage a <> commonOptionsLanguage b+ , commonOptionsMhsOptions = commonOptionsMhsOptions a <> commonOptionsMhsOptions b , commonOptionsGhcOptions = commonOptionsGhcOptions a <> commonOptionsGhcOptions b , commonOptionsGhcProfOptions = commonOptionsGhcProfOptions a <> commonOptionsGhcProfOptions b , commonOptionsGhcSharedOptions = commonOptionsGhcSharedOptions a <> commonOptionsGhcSharedOptions b@@ -1088,6 +1091,7 @@ , sectionDefaultExtensions :: [String] , sectionOtherExtensions :: [String] , sectionLanguage :: Maybe Language+, sectionMhsOptions :: [GhcOption] , sectionGhcOptions :: [GhcOption] , sectionGhcProfOptions :: [GhcProfOption] , sectionGhcSharedOptions :: [GhcOption]@@ -1589,6 +1593,7 @@ , sectionDefaultExtensions = fromMaybeList commonOptionsDefaultExtensions , sectionOtherExtensions = fromMaybeList commonOptionsOtherExtensions , sectionLanguage = join . getLast $ unAlias commonOptionsLanguage+ , sectionMhsOptions = fromMaybeList commonOptionsMhsOptions , sectionGhcOptions = fromMaybeList commonOptionsGhcOptions , sectionGhcProfOptions = fromMaybeList commonOptionsGhcProfOptions , sectionGhcSharedOptions = fromMaybeList commonOptionsGhcSharedOptions
src/Hpack/Render.hs view
@@ -42,7 +42,6 @@ import qualified Data.Map.Lazy as Map import Control.Monad.Reader -import Hpack.Util import Hpack.Config import Hpack.Render.Hints import Hpack.Render.Dsl hiding (RenderSettings(..), defaultRenderSettings, sortFieldsBy)@@ -247,14 +246,15 @@ renderDirectories "hs-source-dirs" sectionSourceDirs , renderDefaultExtensions sectionDefaultExtensions , renderOtherExtensions sectionOtherExtensions- , renderGhcOptions sectionGhcOptions- , renderGhcProfOptions sectionGhcProfOptions- , renderGhcSharedOptions sectionGhcSharedOptions- , renderGhcjsOptions sectionGhcjsOptions- , renderCppOptions sectionCppOptions- , renderAsmOptions sectionAsmOptions- , renderCcOptions sectionCcOptions- , renderCxxOptions sectionCxxOptions+ , Field "mhs-options" $ WordList sectionMhsOptions+ , Field "ghc-options" $ WordList sectionGhcOptions+ , Field "ghc-prof-options" $ WordList sectionGhcProfOptions+ , Field "ghc-shared-options" $ WordList sectionGhcSharedOptions+ , Field "ghcjs-options" $ WordList sectionGhcjsOptions+ , Field "cpp-options" $ WordList sectionCppOptions+ , Field "asm-options" $ WordList sectionAsmOptions+ , Field "cc-options" $ WordList sectionCcOptions+ , Field "cxx-options" $ WordList sectionCxxOptions , renderDirectories "include-dirs" sectionIncludeDirs , Field "install-includes" (LineSeparatedList sectionInstallIncludes) , Field "asm-sources" (renderPaths sectionAsmSources)@@ -265,7 +265,7 @@ , Field "extra-libraries" (LineSeparatedList sectionExtraLibraries) , renderDirectories "extra-frameworks-dirs" sectionExtraFrameworksDirs , Field "frameworks" (LineSeparatedList sectionFrameworks)- , renderLdOptions sectionLdOptions+ , Field "ld-options" $ WordList sectionLdOptions , Field "pkgconfig-depends" (CommaSeparatedList sectionPkgConfigDependencies) ] ++ buildTools@@ -407,33 +407,6 @@ renderLanguage :: Language -> Element renderLanguage (Language lang) = Field "default-language" (Literal lang)--renderGhcOptions :: [GhcOption] -> Element-renderGhcOptions = Field "ghc-options" . WordList--renderGhcProfOptions :: [GhcProfOption] -> Element-renderGhcProfOptions = Field "ghc-prof-options" . WordList--renderGhcSharedOptions :: [GhcOption] -> Element-renderGhcSharedOptions = Field "ghc-shared-options" . WordList--renderGhcjsOptions :: [GhcjsOption] -> Element-renderGhcjsOptions = Field "ghcjs-options" . WordList--renderCppOptions :: [CppOption] -> Element-renderCppOptions = Field "cpp-options" . WordList--renderAsmOptions :: [AsmOption] -> Element-renderAsmOptions = Field "asm-options" . WordList--renderCcOptions :: [CcOption] -> Element-renderCcOptions = Field "cc-options" . WordList--renderCxxOptions :: [CxxOption] -> Element-renderCxxOptions = Field "cxx-options" . WordList--renderLdOptions :: [LdOption] -> Element-renderLdOptions = Field "ld-options" . WordList renderBuildable :: Bool -> Element renderBuildable = Field "buildable" . Literal . show