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
0a386628
Commit
0a386628
authored
Aug 02, 2007
by
Duncan Coutts
Browse files
Alter version parse error message to make it clearer
parent
23cfda3a
Changes
2
Show whitespace changes
Inline
Side-by-side
Distribution/Program.hs
View file @
0a386628
...
...
@@ -208,7 +208,7 @@ findProgramAndVersion verbosity name maybePath versionArg selectVersion = do
str
<-
rawSystemStdout
verbosity
(
programPath
prog
)
[
versionArg
]
case
readVersion
(
selectVersion
str
)
of
Just
v
->
return
prog
{
programVersion
=
Just
v
}
_
->
die
(
"cannot determine version of "
++
name
++
" :
\n
"
++
str
)
_
->
die
(
"cannot determine version of "
++
name
++
" :
\n
"
++
show
str
)
-- ------------------------------------------------------------
-- * cabal programs
...
...
Distribution/Simple/Configure.hs
View file @
0a386628
...
...
@@ -470,7 +470,7 @@ configCompilerVersion GHC compilerP verbosity = do
str
<-
rawSystemStdout
verbosity
(
programPath
compilerP
)
[
"--numeric-version"
]
case
pCheck
(
readP_to_S
parseVersion
str
)
of
[
v
]
->
return
v
_
->
die
(
"cannot determine version of "
++
programName
compilerP
++
":
\n
"
++
str
)
_
->
die
(
"cannot determine version of "
++
programName
compilerP
++
":
\n
"
++
show
str
)
configCompilerVersion
comp
compilerP
verbosity
|
comp
`
elem
`
[
JHC
,
NHC
]
=
do
str
<-
rawSystemStdout
verbosity
(
programPath
compilerP
)
[
"--version"
]
case
words
str
of
...
...
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