entropy 0.2.2 → 0.2.2.1
raw patch · 2 files changed
+8/−2 lines, 2 filesdep ~basesetup-changedPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Setup.hs +7/−1
- entropy.cabal +1/−1
Setup.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE TemplateHaskell #-} import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup@@ -9,6 +10,7 @@ import System.Directory import System.FilePath import System.Exit+import Language.Haskell.TH (appE, varE, mkName, conE) main = defaultMainWithHooks hk where@@ -32,7 +34,11 @@ canUseRDRAND :: FilePath -> IO Bool canUseRDRAND cc = do- withTempDirectory normal "" "testRDRAND" $ \tmpDir -> do+ -- Template haskell to call withTempDirectory in a backward compatible way+ -- withTempDirectory normal False "" "testRDRAND" $ \tmpDir -> do + $(if cabalVersion >= Version [1,17,0] []+ then appE (appE (varE $ mkName "withTempDirectory") (varE 'normal)) (conE (mkName "False"))+ else appE (varE $ mkName "withTempDirectory") (varE 'normal)) "" "testRDRAND" $ \tmpDir -> do writeFile (tmpDir ++ "/testRDRAND.c") (unlines [ "#include <stdint.h>" , "int main() {"
entropy.cabal view
@@ -1,5 +1,5 @@ name: entropy-version: 0.2.2+version: 0.2.2.1 license: BSD3 license-file: LICENSE copyright: Thomas DuBuisson <thomas.dubuisson@gmail.com>