patch for wreq 0.2 to work with lens 4.5

This commit is contained in:
Shaun Sharples 2014-11-06 14:11:37 +02:00
parent e3ec452b1f
commit 314385d7ca
2 changed files with 16 additions and 1 deletions

View File

@ -21,12 +21,12 @@ cabal.mkDerivation (self: {
temporary testFramework testFrameworkHunit text temporary testFramework testFrameworkHunit text
]; ];
doCheck = false; doCheck = false;
patches = [ ./lens-4.5.patch ];
meta = { meta = {
homepage = "http://www.serpentine.com/wreq"; homepage = "http://www.serpentine.com/wreq";
description = "An easy-to-use HTTP client library"; description = "An easy-to-use HTTP client library";
license = self.stdenv.lib.licenses.bsd3; license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms; platforms = self.ghc.meta.platforms;
maintainers = with self.stdenv.lib.maintainers; [ ocharles ]; maintainers = with self.stdenv.lib.maintainers; [ ocharles ];
broken = true;
}; };
}) })

View File

@ -0,0 +1,15 @@
diff --git a/Network/Wreq/Lens/Machinery.hs b/Network/Wreq/Lens/Machinery.hs
index 782d965..0c97d27 100644
--- a/Network/Wreq/Lens/Machinery.hs
+++ b/Network/Wreq/Lens/Machinery.hs
@@ -13,8 +13,8 @@ import Language.Haskell.TH.Syntax (Dec, Name, Q, mkName, nameBase)
defaultRules :: LensRules
defaultRules = lensRules
-fieldName :: (String -> String) -> [Name] -> Name -> [DefName]
-fieldName f _ name = [TopName . mkName . f . nameBase $ name]
+fieldName :: (String -> String) -> Name -> [Name] -> Name -> [DefName]
+fieldName f _ _ name = [TopName . mkName . f . nameBase $ name]
makeLenses :: Name -> Q [Dec]
makeLenses = makeLensesWith (defaultRules & lensField .~ fieldName id)