[commit: packages/Cabal] ghc-head: Add 'suppressOverrideArgs'. (218c6bb)
git at git.haskell.org
git at git.haskell.org
Thu Aug 29 10:12:02 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=218c6bb6ff5f6456e40f3163cd563e2bfa5df246
>---------------------------------------------------------------
commit 218c6bb6ff5f6456e40f3163cd563e2bfa5df246
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date: Mon Aug 26 20:05:28 2013 +0200
Add 'suppressOverrideArgs'.
>---------------------------------------------------------------
218c6bb6ff5f6456e40f3163cd563e2bfa5df246
Cabal/Distribution/Simple/Program.hs | 1 +
Cabal/Distribution/Simple/Program/Types.hs | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/Cabal/Distribution/Simple/Program.hs b/Cabal/Distribution/Simple/Program.hs
index b43edc2..e630caf 100644
--- a/Cabal/Distribution/Simple/Program.hs
+++ b/Cabal/Distribution/Simple/Program.hs
@@ -48,6 +48,7 @@ module Distribution.Simple.Program (
, ProgramLocation(..)
, runProgram
, getProgramOutput
+ , suppressOverrideArgs
-- * Program invocations
, ProgramInvocation(..)
diff --git a/Cabal/Distribution/Simple/Program/Types.hs b/Cabal/Distribution/Simple/Program/Types.hs
index caf7c61..e41e917 100644
--- a/Cabal/Distribution/Simple/Program/Types.hs
+++ b/Cabal/Distribution/Simple/Program/Types.hs
@@ -24,6 +24,7 @@ module Distribution.Simple.Program.Types (
-- * Configured program and related functions
ConfiguredProgram(..),
programPath,
+ suppressOverrideArgs,
ProgArg,
ProgramLocation(..),
simpleConfiguredProgram,
@@ -113,6 +114,10 @@ data ProgramLocation
programPath :: ConfiguredProgram -> FilePath
programPath = locationPath . programLocation
+-- | Suppress any extra arguments added by the user.
+suppressOverrideArgs :: ConfiguredProgram -> ConfiguredProgram
+suppressOverrideArgs prog = prog { programOverrideArgs = [] }
+
-- | Make a simple named program.
--
-- By default we'll just search for it in the path and not try to find the
More information about the ghc-commits
mailing list