Hello community,

here is the log from the commit of package hpack for openSUSE:Leap:15.2 checked 
in at 2020-02-19 18:42:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/hpack (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.hpack.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hpack"

Wed Feb 19 18:42:29 2020 rev:13 rq:771546 version:0.33.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/hpack/hpack.changes    2020-01-15 
15:11:02.830094120 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.hpack.new.26092/hpack.changes 2020-02-19 
18:42:30.286324295 +0100
@@ -1,0 +2,31 @@
+Fri Nov  8 16:15:19 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Sat Oct 12 02:01:57 UTC 2019 - [email protected]
+
+- Update hpack to version 0.33.0.
+  ## Changes in 0.33.0
+    - Support GHC 8.8.1: `fail` is no longer a part of `Monad`. Instead, it 
lives
+      in the `MonadFail` class. Adapting our code to this change meant changing
+      the types of exporting functions, unfortunately, hence the major version
+      bump.
+
+-------------------------------------------------------------------
+Fri Aug 30 02:05:52 UTC 2019 - [email protected]
+
+- Update hpack to version 0.32.0.
+  ## Changes in 0.32.0
+    - Support Cabal 3.0
+    - Switch reexported-modules to comma-separated list
+
+-------------------------------------------------------------------
+Mon Mar  4 03:02:31 UTC 2019 - [email protected]
+
+- Update hpack to version 0.31.2.
+  ## Changes in 0.31.2
+    - Add default value for maintainer (see #339)
+    - Escape commas and spaces in filenames when generating cabal files
+
+-------------------------------------------------------------------

Old:
----
  hpack-0.31.1.tar.gz

New:
----
  hpack-0.33.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hpack.spec ++++++
--- /var/tmp/diff_new_pack.SohPOw/_old  2020-02-19 18:42:30.650325058 +0100
+++ /var/tmp/diff_new_pack.SohPOw/_new  2020-02-19 18:42:30.654325067 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hpack
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,10 @@
 %global pkg_name hpack
 %bcond_with tests
 Name:           %{pkg_name}
-Version:        0.31.1
+Version:        0.33.0
 Release:        0
 Summary:        A modern format for Haskell packages
 License:        MIT
-Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{name}
 Source0:        
https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 BuildRequires:  chrpath
@@ -64,14 +63,12 @@
 
 %package -n ghc-%{name}
 Summary:        Haskell %{name} library
-Group:          System/Libraries
 
 %description -n ghc-%{name}
 This package provides the Haskell %{name} shared library.
 
 %package -n ghc-%{name}-devel
 Summary:        Haskell %{name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       ghc-%{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}

++++++ hpack-0.31.1.tar.gz -> hpack-0.33.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/CHANGELOG.md 
new/hpack-0.33.0/CHANGELOG.md
--- old/hpack-0.31.1/CHANGELOG.md       2018-11-03 21:11:49.000000000 +0100
+++ new/hpack-0.33.0/CHANGELOG.md       2019-10-11 15:27:22.000000000 +0200
@@ -1,3 +1,17 @@
+## Changes in 0.33.0
+  - Support GHC 8.8.1: `fail` is no longer a part of `Monad`. Instead, it lives
+    in the `MonadFail` class. Adapting our code to this change meant changing
+    the types of exporting functions, unfortunately, hence the major version
+    bump.
+
+## Changes in 0.32.0
+  - Support Cabal 3.0
+  - Switch reexported-modules to comma-separated list
+
+## Changes in 0.31.2
+  - Add default value for maintainer (see #339)
+  - Escape commas and spaces in filenames when generating cabal files
+
 ## Changes in 0.31.1
   - Show the header when printing to stdout (see #331)
   - Add help for `--numeric-version`(see #337)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/hpack.cabal new/hpack-0.33.0/hpack.cabal
--- old/hpack-0.31.1/hpack.cabal        2018-11-03 21:11:49.000000000 +0100
+++ new/hpack-0.33.0/hpack.cabal        2019-10-11 15:27:22.000000000 +0200
@@ -1,13 +1,13 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.31.0.
+-- This file has been generated from package.yaml by hpack version 0.32.0.
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: d0e64e7193dd79e7d688f56350272b988a08b6f0f9706767a37f122ceeae72ee
+-- hash: dc706425edd9fa60b9662cefde8da5d890fb9cf19c8f0f9e01733b763bfcd06a
 
 name:           hpack
-version:        0.31.1
+version:        0.33.0
 synopsis:       A modern format for Haskell packages
 description:    See README at <https://github.com/sol/hpack#readme>
 category:       Development
@@ -31,7 +31,7 @@
   build-depends:
       Cabal >=2.2
     , Glob >=0.9.0
-    , aeson >=1.2.1.0
+    , aeson >=1.4.3.0
     , base >=4.9 && <5
     , bifunctors
     , bytestring
@@ -87,7 +87,7 @@
   build-depends:
       Cabal >=2.2
     , Glob >=0.9.0
-    , aeson >=1.2.1.0
+    , aeson >=1.4.3.0
     , base >=4.9 && <5
     , bifunctors
     , bytestring
@@ -125,7 +125,7 @@
     , Glob >=0.9.0
     , HUnit >=1.6.0.0
     , QuickCheck
-    , aeson >=1.2.1.0
+    , aeson >=1.4.3.0
     , base >=4.9 && <5
     , bifunctors
     , bytestring
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Data/Aeson/Config/Parser.hs 
new/hpack-0.33.0/src/Data/Aeson/Config/Parser.hs
--- old/hpack-0.31.1/src/Data/Aeson/Config/Parser.hs    2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/src/Data/Aeson/Config/Parser.hs    2019-10-11 
15:27:22.000000000 +0200
@@ -1,6 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE CPP #-}
 module Data.Aeson.Config.Parser (
   Parser
 , runParser
@@ -31,6 +32,7 @@
 
 import           Control.Monad
 import           Control.Applicative
+import qualified Control.Monad.Fail as Fail
 import           Control.Monad.Trans.Class
 import           Control.Monad.Trans.Writer
 import           Data.Monoid ((<>))
@@ -44,7 +46,9 @@
 import           Data.Aeson.Types (Value(..), Object, Array)
 import qualified Data.Aeson.Types as Aeson
 import           Data.Aeson.Internal (IResult(..), iparse)
+#if !MIN_VERSION_aeson(1,4,5)
 import qualified Data.Aeson.Internal as Aeson
+#endif
 
 -- This is needed so that we have an Ord instance for aeson < 1.2.4.
 data JSONPathElement = Key Text | Index Int
@@ -61,7 +65,7 @@
   Aeson.Index n -> Index n
 
 newtype Parser a = Parser {unParser :: WriterT (Set JSONPath) Aeson.Parser a}
-  deriving (Functor, Applicative, Alternative, Monad)
+  deriving (Functor, Applicative, Alternative, Monad, Fail.MonadFail)
 
 liftParser :: Aeson.Parser a -> Parser a
 liftParser = Parser . lift
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/Config.hs 
new/hpack-0.33.0/src/Hpack/Config.hs
--- old/hpack-0.31.1/src/Hpack/Config.hs        2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/src/Hpack/Config.hs        2019-10-11 15:27:22.000000000 
+0200
@@ -5,6 +5,7 @@
 {-# LANGUAGE DeriveAnyClass #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE LiberalTypeSynonyms #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE RecordWildCards #-}
 {-# LANGUAGE CPP #-}
@@ -62,6 +63,7 @@
 , CppOption
 , CcOption
 , LdOption
+, Path(..)
 #ifdef TEST
 , renameDependencies
 , Empty(..)
@@ -357,9 +359,9 @@
 type ParseCxxSources = Maybe (List FilePath)
 type ParseJsSources = Maybe (List FilePath)
 
-type CSources = [FilePath]
-type CxxSources = [FilePath]
-type JsSources = [FilePath]
+type CSources = [Path]
+type CxxSources = [Path]
+type JsSources = [Path]
 
 type WithCommonOptions cSources cxxSources jsSources a = Product 
(CommonOptions cSources cxxSources jsSources a) a
 
@@ -518,7 +520,7 @@
 , packageConfigCategory :: Maybe String
 , packageConfigStability :: Maybe String
 , packageConfigAuthor :: Maybe (List String)
-, packageConfigMaintainer :: Maybe (List String)
+, packageConfigMaintainer :: Maybe (Maybe (List String))
 , packageConfigCopyright :: Maybe (List String)
 , packageConfigBuildType :: Maybe BuildType
 , packageConfigLicense :: Maybe (Maybe String)
@@ -829,9 +831,9 @@
 , packageLicenseFile :: [FilePath]
 , packageTestedWith :: Maybe String
 , packageFlags :: [Flag]
-, packageExtraSourceFiles :: [FilePath]
-, packageExtraDocFiles :: [FilePath]
-, packageDataFiles :: [FilePath]
+, packageExtraSourceFiles :: [Path]
+, packageExtraDocFiles :: [Path]
+, packageDataFiles :: [Path]
 , packageDataDir :: Maybe FilePath
 , packageSourceRepository :: Maybe SourceRepository
 , packageCustomSetup :: Maybe CustomSetup
@@ -877,10 +879,10 @@
 , sectionGhcjsOptions :: [GhcjsOption]
 , sectionCppOptions :: [CppOption]
 , sectionCcOptions :: [CcOption]
-, sectionCSources :: [FilePath]
+, sectionCSources :: [Path]
 , sectionCxxOptions :: [CxxOption]
-, sectionCxxSources :: [FilePath]
-, sectionJsSources :: [FilePath]
+, sectionCxxSources :: [Path]
+, sectionJsSources :: [Path]
 , sectionExtraLibDirs :: [FilePath]
 , sectionExtraLibraries :: [FilePath]
 , sectionExtraFrameworksDirs :: [FilePath]
@@ -1096,7 +1098,7 @@
       , packageCategory = packageConfigCategory
       , packageStability = packageConfigStability
       , packageAuthor = fromMaybeList packageConfigAuthor
-      , packageMaintainer = fromMaybeList packageConfigMaintainer
+      , packageMaintainer = fromMaybeList maintainer
       , packageCopyright = fromMaybeList packageConfigCopyright
       , packageBuildType = fromMaybe defaultBuildType packageConfigBuildType
       , packageLicense = join packageConfigLicense
@@ -1166,6 +1168,12 @@
       where
         fromGithub = (++ "/issues") . sourceRepositoryUrl <$> github
 
+    maintainer :: Maybe (List String)
+    maintainer = case (packageConfigAuthor, packageConfigMaintainer) of
+      (Just _, Nothing) -> packageConfigAuthor
+      (_, Just m) -> m
+      _            -> Nothing
+
 expandForeignSources
   :: MonadIO m
   => FilePath
@@ -1179,8 +1187,14 @@
     expand fieldName xs = do
       expandGlobs fieldName dir (fromMaybeList xs)
 
-expandGlobs :: MonadIO m => String -> FilePath -> [String] -> Warnings m 
[FilePath]
-expandGlobs name dir patterns = do
+newtype Path = Path { unPath :: FilePath }
+  deriving (Eq, Show, Ord)
+
+instance IsString Path where
+  fromString = Path
+
+expandGlobs :: MonadIO m => String -> FilePath -> [String] -> Warnings m [Path]
+expandGlobs name dir patterns = map Path <$> do
   (warnings, files) <- liftIO $ Util.expandGlobs name dir patterns
   tell warnings
   return files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/License.hs 
new/hpack-0.33.0/src/Hpack/License.hs
--- old/hpack-0.31.1/src/Hpack/License.hs       2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/src/Hpack/License.hs       2019-10-11 15:27:22.000000000 
+0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveFunctor #-}
 {-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE LambdaCase #-}
@@ -9,7 +10,11 @@
 import           Distribution.Version (mkVersion)
 import qualified Distribution.License as Cabal
 import qualified Distribution.SPDX.License as SPDX
+#if MIN_VERSION_Cabal(3,0,0)
+import           Distribution.Parsec (eitherParsec)
+#else
 import           Distribution.Parsec.Class (eitherParsec)
+#endif
 
 import qualified Data.License.Infer as Infer
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/Render.hs 
new/hpack-0.33.0/src/Hpack/Render.hs
--- old/hpack-0.31.1/src/Hpack/Render.hs        2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/src/Hpack/Render.hs        2019-10-11 15:27:22.000000000 
+0200
@@ -66,9 +66,9 @@
     packageFields :: [Element]
     packageFields = addVerbatim packageVerbatim . sortFieldsBy 
existingFieldOrder $
       headerFields ++ [
-        Field "extra-source-files" (LineSeparatedList packageExtraSourceFiles)
-      , Field "extra-doc-files" (LineSeparatedList packageExtraDocFiles)
-      , Field "data-files" (LineSeparatedList packageDataFiles)
+        Field "extra-source-files" (renderPaths packageExtraSourceFiles)
+      , Field "extra-doc-files" (renderPaths packageExtraDocFiles)
+      , Field "data-files" (renderPaths packageDataFiles)
       ] ++ maybe [] (return . Field "data-dir" . Literal) packageDataDir
 
     sourceRepository :: [Element]
@@ -233,9 +233,9 @@
   , renderCxxOptions sectionCxxOptions
   , renderDirectories "include-dirs" sectionIncludeDirs
   , Field "install-includes" (LineSeparatedList sectionInstallIncludes)
-  , Field "c-sources" (LineSeparatedList sectionCSources)
-  , Field "cxx-sources" (LineSeparatedList sectionCxxSources)
-  , Field "js-sources" (LineSeparatedList sectionJsSources)
+  , Field "c-sources" (renderPaths sectionCSources)
+  , Field "cxx-sources" (renderPaths sectionCxxSources)
+  , Field "js-sources" (renderPaths sectionJsSources)
   , renderDirectories "extra-lib-dirs" sectionExtraLibDirs
   , Field "extra-libraries" (LineSeparatedList sectionExtraLibraries)
   , renderDirectories "extra-frameworks-dirs" sectionExtraFrameworksDirs
@@ -306,7 +306,7 @@
 renderGeneratedModules = Field "autogen-modules" . LineSeparatedList
 
 renderReexportedModules :: [String] -> Element
-renderReexportedModules = Field "reexported-modules" . LineSeparatedList
+renderReexportedModules = Field "reexported-modules" . CommaSeparatedList
 
 renderSignatures :: [String] -> Element
 renderSignatures = Field "signatures" . CommaSeparatedList
@@ -395,3 +395,14 @@
 
 renderOtherExtensions :: [String] -> Element
 renderOtherExtensions = Field "other-extensions" . WordList
+
+renderPaths :: [Path] -> Value
+renderPaths = LineSeparatedList . map renderPath
+  where
+    renderPath :: Path -> FilePath
+    renderPath (Path path)
+      | needsQuoting path = show path
+      | otherwise = path
+
+    needsQuoting :: FilePath -> Bool
+    needsQuoting = any (\x -> isSpace x || x == ',')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/Syntax/BuildTools.hs 
new/hpack-0.33.0/src/Hpack/Syntax/BuildTools.hs
--- old/hpack-0.31.1/src/Hpack/Syntax/BuildTools.hs     2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/src/Hpack/Syntax/BuildTools.hs     2019-10-11 
15:27:22.000000000 +0200
@@ -7,6 +7,7 @@
 , SystemBuildTools(..)
 ) where
 
+import qualified Control.Monad.Fail as Fail
 import           Data.Text (Text)
 import qualified Data.Text as T
 import           Data.Semigroup (Semigroup(..))
@@ -53,7 +54,7 @@
       buildToolFromString :: Text -> Parser (ParseBuildTool, DependencyVersion)
       buildToolFromString s = parseQualifiedBuildTool s <|> 
parseUnqualifiedBuildTool s
 
-      parseQualifiedBuildTool :: Monad m => Text -> m (ParseBuildTool, 
DependencyVersion)
+      parseQualifiedBuildTool :: Fail.MonadFail m => Text -> m 
(ParseBuildTool, DependencyVersion)
       parseQualifiedBuildTool = fmap fromCabal . cabalParse "build tool" . 
T.unpack
         where
           fromCabal :: D.ExeDependency -> (ParseBuildTool, DependencyVersion)
@@ -62,7 +63,7 @@
             , DependencyVersion Nothing $ versionConstraintFromCabal version
             )
 
-      parseUnqualifiedBuildTool :: Monad m => Text -> m (ParseBuildTool, 
DependencyVersion)
+      parseUnqualifiedBuildTool :: Fail.MonadFail m => Text -> m 
(ParseBuildTool, DependencyVersion)
       parseUnqualifiedBuildTool = fmap (first UnqualifiedBuildTool) . 
parseDependency "build tool"
 
 newtype SystemBuildTools = SystemBuildTools {
@@ -80,7 +81,7 @@
       , parseName = T.unpack
       }
 
-      parseSystemBuildTool :: Monad m => Text -> m (String, VersionConstraint)
+      parseSystemBuildTool :: Fail.MonadFail m => Text -> m (String, 
VersionConstraint)
       parseSystemBuildTool = fmap fromCabal . cabalParse "system build tool" . 
T.unpack
         where
           fromCabal :: D.LegacyExeDependency -> (String, VersionConstraint)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/Syntax/Dependencies.hs 
new/hpack-0.33.0/src/Hpack/Syntax/Dependencies.hs
--- old/hpack-0.31.1/src/Hpack/Syntax/Dependencies.hs   2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/src/Hpack/Syntax/Dependencies.hs   2019-10-11 
15:27:22.000000000 +0200
@@ -7,6 +7,7 @@
 , parseDependency
 ) where
 
+import qualified Control.Monad.Fail as Fail
 import           Data.Text (Text)
 import qualified Data.Text as T
 import           Data.Semigroup (Semigroup(..))
@@ -59,7 +60,7 @@
 dependencyInfo :: Value -> Parser DependencyInfo
 dependencyInfo = withDependencyVersion (DependencyInfo []) addMixins
 
-parseDependency :: Monad m => String -> Text -> m (String, DependencyVersion)
+parseDependency :: Fail.MonadFail m => String -> Text -> m (String, 
DependencyVersion)
 parseDependency subject = fmap fromCabal . cabalParse subject . T.unpack
   where
     fromCabal :: D.Dependency -> (String, DependencyVersion)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/src/Hpack/Syntax/DependencyVersion.hs 
new/hpack-0.33.0/src/Hpack/Syntax/DependencyVersion.hs
--- old/hpack-0.31.1/src/Hpack/Syntax/DependencyVersion.hs      2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/src/Hpack/Syntax/DependencyVersion.hs      2019-10-11 
15:27:22.000000000 +0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE LambdaCase #-}
 module Hpack.Syntax.DependencyVersion (
@@ -24,6 +25,7 @@
 ) where
 
 import           Control.Applicative
+import qualified Control.Monad.Fail as Fail
 import           Data.Maybe
 import           Data.Scientific
 import           Data.Text (Text)
@@ -32,9 +34,15 @@
 import           Text.PrettyPrint (renderStyle, Style(..), Mode(..))
 
 import           Distribution.Version (VersionRangeF(..))
-import qualified Distribution.Text as D
 import qualified Distribution.Version as D
+
+#if MIN_VERSION_Cabal(3,0,0)
+import qualified Distribution.Parsec as D
+import qualified Distribution.Pretty as D
+#else
 import qualified Distribution.Parsec.Class as D
+import qualified Distribution.Text as D
+#endif
 
 import           Data.Aeson.Config.FromValue
 
@@ -133,13 +141,13 @@
       | otherwise = 0
     e = base10Exponent n
 
-parseVersionRange :: Monad m => String -> m VersionConstraint
+parseVersionRange :: Fail.MonadFail m => String -> m VersionConstraint
 parseVersionRange = fmap versionConstraintFromCabal . parseCabalVersionRange
 
-parseCabalVersionRange :: Monad m => String -> m D.VersionRange
+parseCabalVersionRange :: Fail.MonadFail m => String -> m D.VersionRange
 parseCabalVersionRange = cabalParse "constraint"
 
-cabalParse :: (Monad m, D.Parsec a) => String -> String -> m a
+cabalParse :: (Fail.MonadFail m, D.Parsec a) => String -> String -> m a
 cabalParse subject s = case D.eitherParsec s of
   Right d -> return d
   Left _ ->fail $ unwords ["invalid",  subject, show s]
@@ -147,7 +155,13 @@
 versionConstraintFromCabal :: D.VersionRange -> VersionConstraint
 versionConstraintFromCabal range
   | D.isAnyVersion range = AnyVersion
-  | otherwise = VersionRange . renderStyle style . D.disp $ 
toPreCabal2VersionRange range
+  | otherwise = VersionRange . renderStyle style .
+#if MIN_VERSION_Cabal(3,0,0)
+      D.pretty
+#else
+      D.disp
+#endif
+      $ toPreCabal2VersionRange range
   where
     style = Style OneLineMode 0 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Data/Aeson/Config/FromValueSpec.hs 
new/hpack-0.33.0/test/Data/Aeson/Config/FromValueSpec.hs
--- old/hpack-0.31.1/test/Data/Aeson/Config/FromValueSpec.hs    2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/test/Data/Aeson/Config/FromValueSpec.hs    2019-10-11 
15:27:22.000000000 +0200
@@ -85,7 +85,7 @@
         [yaml|
         name: "Joe"
         age: "23"
-        |] `shouldDecodeTo` left "Error while parsing $.age - expected Int, 
encountered String"
+        |] `shouldDecodeTo` left "Error while parsing $.age - parsing Int 
failed, expected Number, but encountered String"
 
     context "with (,)" $ do
       it "captures unrecognized fields" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Data/Aeson/Config/TypesSpec.hs 
new/hpack-0.33.0/test/Data/Aeson/Config/TypesSpec.hs
--- old/hpack-0.31.1/test/Data/Aeson/Config/TypesSpec.hs        2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/test/Data/Aeson/Config/TypesSpec.hs        2019-10-11 
15:27:22.000000000 +0200
@@ -13,7 +13,7 @@
     context "List" $ do
       let
         parseError :: String -> Result (List Int)
-        parseError prefix = Left (prefix ++ " - expected Int, encountered 
String")
+        parseError prefix = Left (prefix ++ " - parsing Int failed, expected 
Number, but encountered String")
 
       context "when parsing single values" $ do
         it "returns the value in a singleton list" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/EndToEndSpec.hs 
new/hpack-0.33.0/test/EndToEndSpec.hs
--- old/hpack-0.31.1/test/EndToEndSpec.hs       2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/test/EndToEndSpec.hs       2019-10-11 15:27:22.000000000 
+0200
@@ -285,7 +285,7 @@
           path: defaults.yaml
           ref: "2017"
         library: {}
-        |] `shouldFailWith` (file ++ ": Error while parsing $ - expected 
Object, encountered Array")
+        |] `shouldFailWith` (file ++ ": Error while parsing $ - expected 
Object, but encountered Array")
 
       it "warns on unknown fields" $ do
         let file = joinPath ["defaults", "sol", "hpack-template", "2017", 
"defaults.yaml"]
@@ -340,7 +340,7 @@
       it "rejects other values" $ do
         [i|
         version: {}
-        |] `shouldFailWith` "package.yaml: Error while parsing $.version - 
expected Number or String, encountered Object"
+        |] `shouldFailWith` "package.yaml: Error while parsing $.version - 
expected Number or String, but encountered Object"
 
     describe "license" $ do
       it "accepts cabal-style licenses" $ do
@@ -832,6 +832,17 @@
           c-sources: foo/*.c
         |] `shouldWarn` pure "Specified pattern \"foo/*.c\" for c-sources does 
not match any files"
 
+      it "quotes filenames with special characters" $ do
+        touch "cbits/foo bar.c"
+        [i|
+        library:
+          c-sources:
+            - cbits/foo bar.c
+        |] `shouldRenderTo` library_ [i|
+        c-sources:
+            "cbits/foo bar.c"
+        |]
+
     describe "custom-setup" $ do
       it "warns on unknown fields" $ do
         [i|
@@ -1352,14 +1363,14 @@
             then:
               dependencies: Win32
             else: null
-          |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - 
expected Object, encountered Null"
+          |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - 
expected Object, but encountered Null"
 
         it "rejects invalid conditionals" $ do
           [i|
             dependencies:
               - foo
               - 23
-          |] `shouldFailWith` "package.yaml: Error while parsing 
$.dependencies[1] - expected Object or String, encountered Number"
+          |] `shouldFailWith` "package.yaml: Error while parsing 
$.dependencies[1] - expected Object or String, but encountered Number"
 
         it "warns on unknown fields" $ do
           [i|
@@ -1471,6 +1482,30 @@
                 Paths_foo
             default-language: Haskell2010
           |]
+    describe "default value of maintainer" $ do
+      it "gives maintainer precedence" $ do
+        [i|
+          author: John Doe
+          maintainer: Jane Doe
+          |] `shouldRenderTo` package [i|
+          author: John Doe
+          maintainer: Jane Doe
+          |]
+      context "with author" $ do
+        it "uses author if maintainer is not specified" $ do
+          [i|
+            author: John Doe
+            |] `shouldRenderTo` package [i|
+            author: John Doe
+            maintainer: John Doe
+            |]
+        it "omits maintainer if it is null" $ do
+          [i|
+            author: John Doe
+            maintainer: null
+            |] `shouldRenderTo` package [i|
+            author: John Doe
+            |]
 
 run :: HasCallStack => FilePath -> FilePath -> String -> IO ([String], String)
 run userDataDir c old = run_ userDataDir c old >>= either assertFailure return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Hpack/ConfigSpec.hs 
new/hpack-0.33.0/test/Hpack/ConfigSpec.hs
--- old/hpack-0.31.1/test/Hpack/ConfigSpec.hs   2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/test/Hpack/ConfigSpec.hs   2019-10-11 15:27:22.000000000 
+0200
@@ -247,7 +247,8 @@
       withPackageConfig_ [i|
         author: John Doe
         |]
-        (`shouldBe` package {packageAuthor = ["John Doe"]})
+        (`shouldBe` package {packageAuthor = ["John Doe"]
+                            ,packageMaintainer = ["John Doe"]})
 
     it "accepts maintainer" $ do
       withPackageConfig_ [i|
@@ -674,7 +675,7 @@
       it "rejects other values" $ do
         [yaml|
         23
-        |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or 
String, encountered Number" :: Result Cond)
+        |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or 
String, but encountered Number" :: Result Cond)
 
   describe "formatOrList" $ do
     it "formats a singleton list" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Hpack/LicenseSpec.hs 
new/hpack-0.33.0/test/Hpack/LicenseSpec.hs
--- old/hpack-0.31.1/test/Hpack/LicenseSpec.hs  2018-11-03 21:11:49.000000000 
+0100
+++ new/hpack-0.33.0/test/Hpack/LicenseSpec.hs  2019-10-11 15:27:22.000000000 
+0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE QuasiQuotes #-}
 module Hpack.LicenseSpec (spec) where
 
@@ -6,7 +7,11 @@
 import           Data.String.Interpolate
 
 import           Distribution.Pretty (prettyShow)
+#if MIN_VERSION_Cabal(3,0,0)
+import           Distribution.Parsec (simpleParsec)
+#else
 import           Distribution.Parsec.Class (simpleParsec)
+#endif
 import qualified Distribution.License as Cabal
 
 import           Hpack.License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Hpack/Syntax/DefaultsSpec.hs 
new/hpack-0.33.0/test/Hpack/Syntax/DefaultsSpec.hs
--- old/hpack-0.31.1/test/Hpack/Syntax/DefaultsSpec.hs  2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/test/Hpack/Syntax/DefaultsSpec.hs  2019-10-11 
15:27:22.000000000 +0200
@@ -151,4 +151,4 @@
         it "fails" $ do
           [yaml|
           10
-          |] `shouldDecodeTo` left "Error while parsing $ - expected Object or 
String, encountered Number"
+          |] `shouldDecodeTo` left "Error while parsing $ - expected Object or 
String, but encountered Number"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.31.1/test/Hpack/Syntax/DependenciesSpec.hs 
new/hpack-0.33.0/test/Hpack/Syntax/DependenciesSpec.hs
--- old/hpack-0.31.1/test/Hpack/Syntax/DependenciesSpec.hs      2018-11-03 
21:11:49.000000000 +0100
+++ new/hpack-0.33.0/test/Hpack/Syntax/DependenciesSpec.hs      2019-10-11 
15:27:22.000000000 +0200
@@ -125,7 +125,7 @@
         it "rejects invalid values" $ do
           [yaml|
             hpack: []
-          |] `shouldDecodeTo` left "Error while parsing $.hpack - expected 
Null, Object, Number, or String, encountered Array"
+          |] `shouldDecodeTo` left "Error while parsing $.hpack - expected 
Null, Object, Number, or String, but encountered Array"
 
         context "when the constraint is a Number" $ do
           it "accepts 1" $ do
@@ -213,7 +213,7 @@
               [yaml|
                 foo:
                   version: {}
-              |] `shouldDecodeTo` left "Error while parsing $.foo.version - 
expected Null, Number, or String, encountered Object"
+              |] `shouldDecodeTo` left "Error while parsing $.foo.version - 
expected Null, Number, or String, but encountered Object"
 
             it "accepts a string" $ do
               [yaml|


Reply via email to