Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
0888d25f
Commit
0888d25f
authored
Jan 26, 2008
by
Duncan Coutts
Browse files
Delete rawSystemPathExit, use rawSystemExit
There was only one use and no point since rawSystem uses the path anyway.
parent
857f431e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Distribution/Simple.hs
View file @
0888d25f
...
...
@@ -96,7 +96,7 @@ import Distribution.Simple.Haddock (haddock, hscolour)
import
Distribution.Simple.Utils
(
die
,
notice
,
info
,
warn
,
chattyTry
,
currentDir
,
moduleToFilePath
,
defaultPackageDesc
,
defaultHookedPackageDesc
,
rawSystemPathExit
,
rawSystemExit
)
rawSystemExit
)
import
Distribution.Verbosity
import
Language.Haskell.Extension
import
Distribution.Version
...
...
@@ -455,7 +455,7 @@ defaultUserHooks = autoconfUserHooks {
no_extra_flags
args
confExists
<-
doesFileExist
"configure"
when
confExists
$
rawSystem
Path
Exit
verbosity
"sh"
$
rawSystemExit
verbosity
"sh"
$
"configure"
:
configureArgs
backwardsCompatHack
flags
backwardsCompatHack
=
True
...
...
Distribution/Simple/Utils.hs
View file @
0888d25f
...
...
@@ -57,7 +57,6 @@ module Distribution.Simple.Utils (
maybeExit
,
xargs
,
matchesDescFile
,
rawSystemPathExit
,
smartCopySources
,
createDirectoryIfMissingVerbose
,
copyFileVerbose
,
...
...
@@ -100,7 +99,7 @@ import System.Exit
import
System.FilePath
(
takeDirectory
,
takeExtension
,
(
</>
),
(
<.>
),
pathSeparator
)
import
System.Directory
(
copyFile
,
findExecutable
,
createDirectoryIfMissing
)
(
copyFile
,
createDirectoryIfMissing
)
import
System.IO
(
hPutStrLn
,
stderr
,
hFlush
,
stdout
)
import
System.IO.Error
...
...
@@ -242,14 +241,6 @@ rawSystemExit verbosity path args = do
hFlush
stdout
maybeExit
$
rawSystem
path
args
-- Exit with the same exitcode if the subcommand fails
rawSystemPathExit
::
Verbosity
->
String
->
[
String
]
->
IO
()
rawSystemPathExit
verbosity
prog
args
=
do
r
<-
findExecutable
prog
case
r
of
Nothing
->
die
(
"Cannot find: "
++
prog
)
Just
path
->
rawSystemExit
verbosity
path
args
-- Run a command and return its output
rawSystemStdout
::
Verbosity
->
FilePath
->
[
String
]
->
IO
String
rawSystemStdout
verbosity
path
args
=
do
...
...
@@ -294,7 +285,7 @@ rawSystemStdout' verbosity path args = do
--
-- Use it with either of the rawSystem variants above. For example:
--
-- > xargs (32*1024) (rawSystem
Path
Exit verbosity) prog fixedArgs bigArgs
-- > xargs (32*1024) (rawSystemExit verbosity) prog fixedArgs bigArgs
--
xargs
::
Int
->
([
String
]
->
IO
()
)
->
[
String
]
->
[
String
]
->
IO
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment