diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2015-04-03 02:02:44 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2015-04-03 02:02:44 +0200 |
commit | b4f8e009213e88e148da497c66453bc3760cc59c (patch) | |
tree | 0cdd7f4fef601b691b3b01ce9001d444fe8d2e11 /Distribution | |
parent | b1e488bbb31140ee175405416076d10a0403bd67 (diff) |
Fix ghc 7.4
Diffstat (limited to 'Distribution')
-rw-r--r-- | Distribution/Helper.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Distribution/Helper.hs b/Distribution/Helper.hs index b06ffe4..1a4bc37 100644 --- a/Distribution/Helper.hs +++ b/Distribution/Helper.hs @@ -57,6 +57,7 @@ import Control.Monad.IO.Class import Control.Monad.State.Strict import Control.Monad.Reader import Control.Exception as E +import Data.Char import Data.Monoid import Data.List import Data.Default @@ -211,6 +212,10 @@ buildPlatform :: IO String buildPlatform = do exe <- findLibexecExe "cabal-helper-wrapper" dropWhileEnd isSpace <$> readProcess exe ["print-build-platform"] "" + where + -- dropWhileEnd is not provided prior to base 4.5.0.0. + dropWhileEnd :: (a -> Bool) -> [a] -> [a] + dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) [] -- | This exception is thrown by all 'runQuery' functions if the internal -- wrapper executable cannot be found. You may catch this and present the user |