git.iko.soy/typeable/entropy
on main help sign in
Revert "Use template haskell to fix the call to withTempDirectory in Setup.hs so that it works with Cabal 1.17".

It turns out this will not be changing in 1.18 (official Cabal release), so we need to revert this change. https://github.com/haskell/cabal/issues/1387 This reverts commit aa709c52fd3d9ff77738d739304e40d195eea3e1.

commit4a9c53233fa9489137da91feb165131db81d03e1 authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateWed 24 Jul 2013, 13:32 (13 years ago) parent2e52201
1 file changed+1−7
Setup.hs+1−7
Setup.hs+1−7
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TemplateHaskell #-}
21import Distribution.Simple
32import Distribution.Simple.LocalBuildInfo
43import Distribution.Simple.Setup
@@ -10,7 +9,6 @@ import System.Process
109import System.Directory
1110import System.FilePath
1211import System.Exit
13−import Language.Haskell.TH (appE, varE, mkName, conE)
1412
1513main = defaultMainWithHooks hk
1614 where
@@ -34,11 +32,7 @@ cArgsHC = map ("-optc" ++) cArgs
3432
3533canUseRDRAND :: FilePath -> IO Bool
3634canUseRDRAND cc = do
37− -- Template haskell to call withTempDirectory in a backward compatible way
38− -- withTempDirectory normal False "" "testRDRAND" $ \tmpDir -> do
39− $(if cabalVersion >= Version [1,17,0] []
40− then appE (appE (varE $ mkName "withTempDirectory") (varE 'normal)) (conE (mkName "False"))
41− else appE (varE $ mkName "withTempDirectory") (varE 'normal)) "" "testRDRAND" $ \tmpDir -> do
35+ withTempDirectory normal "" "testRDRAND" $ \tmpDir -> do
4236 writeFile (tmpDir ++ "/testRDRAND.c")
4337 (unlines [ "#include <stdint.h>"
4438 , "int main() {"