summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-10-11 21:23:53 +0200
committerMarius Bakke <marius@gnu.org>2021-10-11 21:53:31 +0200
commit0105f33a4ddd7d3ef3d66bd16e16595dd500d404 (patch)
tree3e3e7b764c5db22488a880fb69817384af8c7702 /gnu/packages/patches
parent63162b19656a308d34ce583dee5360b8976fe07d (diff)
gnu: ganeti: Adjust to GHC 8.10 / Stackage 18.10.
* gnu/packages/patches/ganeti-haskell-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/virtualization.scm (ganeti)[source](patches): Add it. [arguments]: Add phase patch-version-constraints.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/ganeti-haskell-compat.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/ganeti-haskell-compat.patch b/gnu/packages/patches/ganeti-haskell-compat.patch
new file mode 100644
index 0000000000..931c50e116
--- /dev/null
+++ b/gnu/packages/patches/ganeti-haskell-compat.patch
@@ -0,0 +1,18 @@
+Adjust to type change of TupE in Template Haskell 2.16.
+
+diff --git a/src/Ganeti/THH/Types.hs b/src/Ganeti/THH/Types.hs
+--- a/src/Ganeti/THH/Types.hs
++++ b/src/Ganeti/THH/Types.hs
+@@ -123,4 +123,11 @@ curryN n = do
+ f <- newName "f"
+ ps <- replicateM n (newName "x")
+ return $ LamE (VarP f : map VarP ps)
+- (AppE (VarE f) (TupE $ map VarE ps))
++ (AppE (VarE f) (nonUnaryTupE $ map VarE ps))
++ where
++ nonUnaryTupE :: [Exp] -> Exp
++ nonUnaryTupE es = TupE $
++#if MIN_VERSION_template_haskell(2,16,0)
++ map Just
++#endif
++ es