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) + {hookedPreProcessors = ( ("mapping" , \_ _ _ -> mappingPreprocessor) + : ("mapping2", \_ _ _ -> mappingPreprocessor) + : ("xml" , \_ _ _ -> xmlPreprocessor) + : (hookedPreProcessors simpleUserHooks) ) }) +#else +main = defaultMainWithHooks (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 diff --git a/stack.yaml b/stack.yaml index 6cbacba..52f1119 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-8.22 +resolver: lts-10.5 # User packages to be built. # Various formats can be used as shown in the example below. @@ -63,4 +63,4 @@ extra-package-dbs: [] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file +# compiler-check: newer-minor