summaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2014-01-30 01:47:39 -0500
committerAdam Vogt <vogt.adam@gmail.com>2014-01-30 01:52:35 -0500
commitb60cffc90daa55c82d0190965d51588aa7d1edce (patch)
treed1591264f97ff30dc2c39201a27986585f6d46a0 /Config.hs
parent4382cadadfb4b9312c49fa5fe51537f60a7e2f54 (diff)
rename variables so Prelude.join will not cause problems
* background: http://www.haskell.org/haskellwiki/Functor-Applicative-Monad_Proposal#Current_stage:_Prepare_GHC * the change happens in ghc-7.10, and these changes fix warnings with 7.8
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Config.hs b/Config.hs
index a81676f..5145d1a 100644
--- a/Config.hs
+++ b/Config.hs
@@ -48,20 +48,20 @@ writeTestProg bInfo contents = writeFile (testProgLoc bInfo) contents
48 48
49-- compile, discarding error messages 49-- compile, discarding error messages
50compile cmd = do 50compile cmd = do
51 let processRecord = (shell $ join cmd) { std_out = CreatePipe 51 let processRecord = (shell $ unwords cmd) { std_out = CreatePipe
52 , std_err = CreatePipe } 52 , std_err = CreatePipe }
53 ( _, _, _, h) <- createProcess processRecord 53 ( _, _, _, h) <- createProcess processRecord
54 waitForProcess h 54 waitForProcess h
55 55
56-- command to compile the test program 56-- command to compile the test program
57compileCmd bInfo buildInfo = [ "gcc " 57compileCmd bInfo buildInfo = [ "gcc "
58 , (join $ ccOptions buildInfo) 58 , (unwords $ ccOptions buildInfo)
59 , (join $ cppOptions buildInfo) 59 , (unwords $ cppOptions buildInfo)
60 , (join $ map ("-I"++) $ includeDirs buildInfo) 60 , (unwords $ map ("-I"++) $ includeDirs buildInfo)
61 , testProgLoc bInfo 61 , testProgLoc bInfo
62 , "-o" 62 , "-o"
63 , testOutLoc bInfo 63 , testOutLoc bInfo
64 , (join $ map ("-L"++) $ extraLibDirs buildInfo) 64 , (unwords $ map ("-L"++) $ extraLibDirs buildInfo)
65 ] 65 ]
66 66
67-- compile a simple program with symbols from GSL and LAPACK with the given libs 67-- compile a simple program with symbols from GSL and LAPACK with the given libs
@@ -72,7 +72,6 @@ testprog bInfo buildInfo libs fmks = do
72 ++ [ (prepend "-l" $ libs) 72 ++ [ (prepend "-l" $ libs)
73 , (prepend "-framework " fmks) ] 73 , (prepend "-framework " fmks) ]
74 74
75join = intercalate " "
76prepend x = unwords . map (x++) . words 75prepend x = unwords . map (x++) . words
77 76
78check bInfo buildInfo libs fmks = (ExitSuccess ==) `fmap` testprog bInfo buildInfo libs fmks 77check bInfo buildInfo libs fmks = (ExitSuccess ==) `fmap` testprog bInfo buildInfo libs fmks