~ruther/guix-local

ref: 26ebd111bcefc5d84cab545724544a3e57b4a558 guix-local/gnu/packages/patches/ganeti-haskell-compat.patch -rw-r--r-- 614 bytes
26ebd111 — Ludovic Courtès gnu: polkit: Rename default variable to 'polkit-mozjs'. 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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