From 317911a1696af809f0c3342dc65892329d37301f Mon Sep 17 00:00:00 2001 From: David Eichmann <EichmannD@gmail.com> Date: Tue, 15 Dec 2020 15:56:23 +0000 Subject: [PATCH] Add bifunctors-5.5.8 --- patches/bifunctors-5.5.8.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/bifunctors-5.5.8.patch diff --git a/patches/bifunctors-5.5.8.patch b/patches/bifunctors-5.5.8.patch new file mode 100644 index 00000000..a0c151c0 --- /dev/null +++ b/patches/bifunctors-5.5.8.patch @@ -0,0 +1,22 @@ +diff --git a/src/Data/Bifunctor/TH.hs b/src/Data/Bifunctor/TH.hs +index 7e0b82c..f08df28 100644 +--- a/src/Data/Bifunctor/TH.hs ++++ b/src/Data/Bifunctor/TH.hs +@@ -1236,7 +1236,7 @@ mkSimpleConMatch :: (Name -> [a] -> Q Exp) + -> Q Match + mkSimpleConMatch fold conName insides = do + varsNeeded <- newNameList "_arg" $ length insides +- let pat = ConP conName (map VarP varsNeeded) ++ let pat = ConP conName [] (map VarP varsNeeded) + rhs <- fold conName (zipWith (\i v -> i $ VarE v) insides varsNeeded) + return $ Match pat (NormalB rhs) [] + +@@ -1260,7 +1260,7 @@ mkSimpleConMatch2 :: (Exp -> [Exp] -> Q Exp) + -> Q Match + mkSimpleConMatch2 fold conName insides = do + varsNeeded <- newNameList "_arg" lengthInsides +- let pat = ConP conName (map VarP varsNeeded) ++ let pat = ConP conName [] (map VarP varsNeeded) + -- Make sure to zip BEFORE invoking catMaybes. We want the variable + -- indicies in each expression to match up with the argument indices + -- in conExpr (defined below). -- GitLab