summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/patches/encoding-Cabal-2.0.patch
blob: 510e450945b8938c6c84606868b1ea709a8450e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 67bb87ceff53f0178c988dd4e15eeb2daee92b84 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <pngwjpgh@users.noreply.github.com>
Date: Tue, 20 Feb 2018 17:46:24 +0100
Subject: [PATCH] Relax upper version bounds on dependencies

---
 Setup.hs       | 20 ++++++++++++++++----
 encoding.cabal |  4 ++--
 stack.yaml     |  4 ++--
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/Setup.hs b/Setup.hs
index de719e6..fe5b84c 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,13 +1,25 @@
+{-# LANGUAGE CPP #-}
+
 module Main where
 
 import Distribution.Simple
 import Data.Encoding.Preprocessor.Mapping
 import Data.Encoding.Preprocessor.XMLMappingBuilder
 
+#if MIN_VERSION_Cabal(2,0,0)
+main = defaultMainWithHooks (simpleUserHooks
+                             {hookedPreProcessors = ( ("mapping" , \_ _ _ -> mappingPreprocessor)
+                                                    : ("mapping2", \_ _ _ -> mappingPreprocessor)
+                                                    : ("xml"     , \_ _ _ -> xmlPreprocessor)
+                                                    : (hookedPreProcessors simpleUserHooks)
+                                                    )
+                             })
+#else
 main = defaultMainWithHooks (simpleUserHooks
-                             {hookedPreProcessors = (("mapping",\_ _ -> mappingPreprocessor)
-                                                     :("mapping2",\_ _ -> mappingPreprocessor)
-                                                     :("xml",\_ _ -> xmlPreprocessor)
-                                                     :(hookedPreProcessors simpleUserHooks)
+                             {hookedPreProcessors = ( ("mapping" , \_ _ -> mappingPreprocessor)
+                                                    : ("mapping2", \_ _ -> mappingPreprocessor)
+                                                    : ("xml"     , \_ _ -> xmlPreprocessor)
+                                                    : (hookedPreProcessors simpleUserHooks)
                                                     )
                              })
+#endif
diff --git a/encoding.cabal b/encoding.cabal
index ec20617..f221715 100644
--- a/encoding.cabal
+++ b/encoding.cabal
@@ -36,7 +36,7 @@ Source-Repository this
 
 Custom-Setup
   Setup-Depends: base >=3 && <5,
-                 Cabal >=1.24 && <1.25,
+                 Cabal >=1.24 && <2.1,
                  containers,
                  filepath,
                  ghc-prim,
@@ -51,7 +51,7 @@ Library
                  extensible-exceptions >=0.1 && <0.2,
                  ghc-prim >=0.3 && <0.6,
                  mtl >=2.0 && <2.3,
-                 regex-compat >=0.71 && <0.95
+                 regex-compat >=0.71 && <0.96
 
   Extensions: CPP