Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1fd9854b
Commit
1fd9854b
authored
Jun 05, 2017
by
Zhen Zhang
Committed by
Andrey Mokhov
Jun 05, 2017
Browse files
Fix CABAL_VERSION argument in building ghc-cabal (
#319
)
parent
bc32262d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Settings/Packages/GhcCabal.hs
View file @
1fd9854b
module
Settings.Packages.GhcCabal
(
ghcCabalPackageArgs
)
where
import
Distribution.PackageDescription.Parse
import
Base
import
GHC
import
Oracles.Config.Setting
import
Predicate
import
Package
(
pkgCabalFile
)
import
Distribution.Verbosity
(
silent
)
import
Distribution.Text
(
display
)
import
Distribution.Package
(
pkgVersion
)
import
Distribution.PackageDescription
(
packageDescription
)
import
qualified
Distribution.PackageDescription
as
DP
ghcCabalPackageArgs
::
Args
ghcCabalPackageArgs
=
stage0
?
package
ghcCabal
?
builder
Ghc
?
do
...
...
@@ -12,10 +20,17 @@ ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
win
<-
lift
windowsHost
let
cabalDeps
=
[
array
,
base
,
bytestring
,
containers
,
deepseq
,
directory
,
pretty
,
process
,
time
,
if
win
then
win32
else
unix
]
lift
$
need
[
pkgCabalFile
cabal
]
pd
<-
liftIO
.
readGenericPackageDescription
silent
$
pkgCabalFile
cabal
let
identifier
=
DP
.
package
.
packageDescription
$
pd
cabalVersion
=
display
.
pkgVersion
$
identifier
mconcat
[
append
[
"-package "
++
pkgNameString
pkg
|
pkg
<-
cabalDeps
]
,
arg
"--make"
,
arg
"-j"
,
arg
(
"-DCABAL_VERSION="
++
replace
"."
","
cabalVersion
)
,
arg
"-DBOOTSTRAPPING"
,
arg
"-DMIN_VERSION_binary_0_8_0"
,
arg
"-DGENERICS"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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