packages feed

hpack 0.28.0 → 0.28.1

raw patch · 6 files changed

+36/−17 lines, 6 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Hpack.Config: instance (GHC.Base.Monoid cSources, GHC.Base.Monoid cxxSources, GHC.Base.Monoid jsSources) => GHC.Base.Monoid (Hpack.Config.CommonOptions cSources cxxSources jsSources a)
+ Hpack.Config: instance (Data.Semigroup.Semigroup cSources, Data.Semigroup.Semigroup cxxSources, Data.Semigroup.Semigroup jsSources) => Data.Semigroup.Semigroup (Hpack.Config.CommonOptions cSources cxxSources jsSources a)
+ Hpack.Config: instance (Data.Semigroup.Semigroup cSources, Data.Semigroup.Semigroup cxxSources, Data.Semigroup.Semigroup jsSources, GHC.Base.Monoid cSources, GHC.Base.Monoid cxxSources, GHC.Base.Monoid jsSources) => GHC.Base.Monoid (Hpack.Config.CommonOptions cSources cxxSources jsSources a)
+ Hpack.Config: instance Data.Semigroup.Semigroup Hpack.Config.Empty
+ Hpack.Config: instance Data.Semigroup.Semigroup Hpack.Config.ExecutableSection
+ Hpack.Config: instance Data.Semigroup.Semigroup Hpack.Config.LibrarySection

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+## Changes in 0.28.1+  - GHC 8.4.1 compatibility+ ## Changes in 0.28.0   - Add support for `cxx-options` and `cxx-sources` (see #205)   - Add support for `data-dir` (see #100)
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2014-2016 Simon Hengel <sol@typeful.net>+Copyright (c) 2014-2018 Simon Hengel <sol@typeful.net>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
hpack.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: e6f8fbe41b4e0a521f34c4fea72bce81d6d2fbe27b00462a16c07b3b3d049d34+-- hash: 7d11b64019bcd70a856a7bd339ef0a2be052be71eff6a5a81bd549cd56befe1c  name:           hpack-version:        0.28.0+version:        0.28.1 synopsis:       An alternative format for Haskell packages description:    See README at <https://github.com/sol/hpack#readme> category:       Development
src/Data/Aeson/Config/Types.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Data.Aeson.Config.Types where -import           Data.Monoid hiding (Product)+import           Data.Semigroup (Semigroup(..)) import           Data.Bitraversable import           Data.Bifoldable import           Data.Bifunctor@@ -12,7 +12,7 @@ import           Data.Aeson.Config.FromValue  newtype List a = List {fromList :: [a]}-  deriving (Eq, Show, Functor, Foldable, Traversable, Monoid)+  deriving (Eq, Show, Functor, Foldable, Traversable, Semigroup, Monoid)  instance FromValue a => FromValue (List a) where   fromValue v = List <$> case v of@@ -25,9 +25,12 @@ data Product a b = Product a b   deriving (Eq, Show, Functor, Foldable, Traversable) -instance (Monoid a, Monoid b) => Monoid (Product a b) where+instance (Semigroup a, Semigroup b, Monoid a, Monoid b) => Monoid (Product a b) where   mempty = Product mempty mempty-  Product a1 b1 `mappend` Product a2 b2 = Product (a1 <> a2) (b1 <> b2)+  mappend = (<>)++instance (Semigroup a, Semigroup b) => Semigroup (Product a b) where+  Product a1 b1 <> Product a2 b2 = Product (a1 <> a2) (b1 <> b2)  instance Bifunctor Product where   bimap fa fb (Product a b) = Product (fa a) (fb b)
src/Hpack/Config.hs view
@@ -80,7 +80,7 @@ import qualified Data.HashMap.Lazy as HashMap import           Data.List (nub, (\\), sortBy, intercalate) import           Data.Maybe-import           Data.Monoid hiding (Product)+import           Data.Semigroup (Semigroup(..)) import           Data.Ord import           Data.Text (Text) import qualified Data.Text as T@@ -184,7 +184,10 @@  instance Monoid LibrarySection where   mempty = LibrarySection Nothing Nothing Nothing Nothing Nothing Nothing Nothing-  mappend a b = LibrarySection {+  mappend = (<>)++instance Semigroup LibrarySection where+  a <> b = LibrarySection {       librarySectionExposed = librarySectionExposed b <|> librarySectionExposed a     , librarySectionExposedModules = librarySectionExposedModules a <> librarySectionExposedModules b     , librarySectionGeneratedExposedModules = librarySectionGeneratedExposedModules a <> librarySectionGeneratedExposedModules b@@ -202,7 +205,10 @@  instance Monoid ExecutableSection where   mempty = ExecutableSection Nothing Nothing Nothing-  mappend a b = ExecutableSection {+  mappend = (<>)++instance Semigroup ExecutableSection where+  a <> b = ExecutableSection {       executableSectionMain = executableSectionMain b <|> executableSectionMain a     , executableSectionOtherModules = executableSectionOtherModules a <> executableSectionOtherModules b     , executableSectionGeneratedOtherModules = executableSectionGeneratedOtherModules a <> executableSectionGeneratedOtherModules b@@ -266,7 +272,7 @@ type ParseCommonOptions = CommonOptions ParseCSources ParseCxxSources ParseJsSources instance FromValue a => FromValue (ParseCommonOptions a) -instance (Monoid cSources, Monoid cxxSources, Monoid jsSources) => Monoid (CommonOptions cSources cxxSources jsSources a) where+instance (Semigroup cSources, Semigroup cxxSources, Semigroup jsSources, Monoid cSources, Monoid cxxSources, Monoid jsSources) => Monoid (CommonOptions cSources cxxSources jsSources a) where   mempty = CommonOptions {     commonOptionsSourceDirs = Nothing   , commonOptionsDependencies = Nothing@@ -294,7 +300,10 @@   , commonOptionsBuildTools = Nothing   , commonOptionsVerbatim = Nothing   }-  mappend a b = CommonOptions {+  mappend = (<>)++instance (Semigroup cSources, Semigroup cxxSources, Semigroup jsSources) => Semigroup (CommonOptions cSources cxxSources jsSources a) where+  a <> b = CommonOptions {     commonOptionsSourceDirs = commonOptionsSourceDirs a <> commonOptionsSourceDirs b   , commonOptionsDependencies = commonOptionsDependencies b <> commonOptionsDependencies a   , commonOptionsPkgConfigDependencies = commonOptionsPkgConfigDependencies a <> commonOptionsPkgConfigDependencies b@@ -428,8 +437,11 @@  instance Monoid Empty where   mempty = Empty-  mappend Empty Empty = Empty+  mappend = (<>) +instance Semigroup Empty where+  Empty <> Empty = Empty+ instance FromValue Empty where   fromValue _ = return Empty @@ -741,14 +753,14 @@     }  expandDefaults-  :: (FromValue a, Monoid a)+  :: (FromValue a, Semigroup a, Monoid a)   => FilePath   -> FilePath   -> WithCommonOptionsWithDefaults a   -> Warnings (Errors IO) (WithCommonOptions ParseCSources ParseCxxSources ParseJsSources a) expandDefaults userDataDir = expand []   where-    expand :: (FromValue a, Monoid a) =>+    expand :: (FromValue a, Semigroup a, Monoid a) =>          [FilePath]       -> FilePath       -> WithCommonOptionsWithDefaults a@@ -757,7 +769,7 @@       d <- mconcat <$> mapM (get seen dir) (fromMaybeList defaultsConfigDefaults)       return (d <> c) -    get :: forall a. (FromValue a, Monoid a) =>+    get :: forall a. (FromValue a, Semigroup a, Monoid a) =>          [FilePath]       -> FilePath       -> Defaults
src/Hpack/Syntax/Dependency.hs view
@@ -13,6 +13,7 @@ ) where  import qualified Data.Text as T+import           Data.Semigroup (Semigroup(..)) import           Text.PrettyPrint (renderStyle, Style(..), Mode(..)) import           Control.Monad import qualified Distribution.Compat.ReadP as D@@ -32,7 +33,7 @@  newtype Dependencies = Dependencies {   unDependencies :: Map String DependencyVersion-} deriving (Eq, Show, Monoid)+} deriving (Eq, Show, Semigroup, Monoid)  instance IsList Dependencies where   type Item Dependencies = (String, DependencyVersion)