summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-05-28 13:52:43 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2017-05-28 18:52:58 +0100
commitb1804a87a8bcf950a2fc12a2960bf68703f4b90a (patch)
tree7bd7604ae751c75240fa91ca0fb07d07ab745a6d /dev-haskell/hpack/files
parentdev-haskell/interpolate: new package, a depend of dev-haskell/stack (diff)
downloadgentoo-b1804a87a8bcf950a2fc12a2960bf68703f4b90a.tar.gz
gentoo-b1804a87a8bcf950a2fc12a2960bf68703f4b90a.tar.bz2
gentoo-b1804a87a8bcf950a2fc12a2960bf68703f4b90a.zip
dev-haskell/hpack: new package, a depend of dev-haskell/stack
An alternative format for Haskell packages Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-haskell/hpack/files')
-rw-r--r--dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch b/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch
new file mode 100644
index 000000000000..a4b3fd1f4b6a
--- /dev/null
+++ b/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch
@@ -0,0 +1,24 @@
+diff --git a/src/Hpack/Config.hs b/src/Hpack/Config.hs
+index cb84f71..5566b8c 100644
+--- a/src/Hpack/Config.hs
++++ b/src/Hpack/Config.hs
+@@ -101,3 +101,9 @@ githubBaseUrl = "https://github.com/"
+
+-genericParseJSON_ :: forall a. (Generic a, GFromJSON (Rep a), HasTypeName a) => Value -> Parser a
++#if MIN_VERSION_aeson(1,0,0)
++# define AESON_ARITY Zero
++#else
++# define AESON_ARITY
++#endif
++
++genericParseJSON_ :: forall a. (Generic a, GFromJSON AESON_ARITY (Rep a), HasTypeName a) => Value -> Parser a
+ genericParseJSON_ = genericParseJSON defaultOptions {fieldLabelModifier = hyphenize name}
+diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs
+index 320ba9a..d13d932 100644
+--- a/test/Hpack/ConfigSpec.hs
++++ b/test/Hpack/ConfigSpec.hs
+@@ -971,3 +971,3 @@ spec = do
+ |]
+- readPackageConfig file `shouldReturn` Left (file ++ ": Error in $.executables.foo: failed to parse field executables: The key \"main\" was not found")
++ readPackageConfig file `shouldReturn` Left (file ++ ": Error in $.executables.foo: key \"main\" not present")
+