1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

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
];
doCheck = false;
patches = [ ./lens-4.5.patch ];
meta = {
homepage = "http://www.serpentine.com/wreq";
description = "An easy-to-use HTTP client library";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
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)