Skip to content
GitLab
Menu
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
bbc6e4a2
Commit
bbc6e4a2
authored
Dec 12, 2015
by
Andrey Mokhov
Browse files
Add support for building ghc-pkg.
parent
3021dbeb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/GHC.hs
View file @
bbc6e4a2
module
GHC
(
module
GHC
(
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
,
containers
,
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
,
containers
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPrim
,
haskeline
,
hoopl
,
hpc
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPkg
,
ghcPrim
,
haskeline
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
primitive
,
process
,
stm
,
hoopl
,
hpc
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
primitive
,
process
,
templateHaskell
,
terminfo
,
time
,
transformers
,
unix
,
win32
,
xhtml
,
stm
,
templateHaskell
,
terminfo
,
time
,
transformers
,
unix
,
win32
,
xhtml
,
defaultKnownPackages
,
defaultTargetDirectory
,
defaultProgramPath
defaultKnownPackages
,
defaultTargetDirectory
,
defaultProgramPath
)
where
)
where
...
@@ -19,16 +19,16 @@ import Stage
...
@@ -19,16 +19,16 @@ import Stage
defaultKnownPackages
::
[
Package
]
defaultKnownPackages
::
[
Package
]
defaultKnownPackages
=
defaultKnownPackages
=
[
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
[
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
,
containers
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPrim
,
containers
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPkg
,
ghcPrim
,
haskeline
,
hoopl
,
hpc
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
haskeline
,
hoopl
,
hpc
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
primitive
,
process
,
stm
,
templateHaskell
,
terminfo
,
time
,
transformers
,
primitive
,
process
,
stm
,
templateHaskell
,
terminfo
,
time
,
transformers
,
unix
,
win32
,
xhtml
]
,
unix
,
win32
,
xhtml
]
-- Package definitions
-- Package definitions
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
,
containers
,
array
,
base
,
binPackageDb
,
binary
,
bytestring
,
cabal
,
compiler
,
containers
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPrim
,
haskeline
,
hoopl
,
hpc
,
deepseq
,
directory
,
filepath
,
ghc
,
ghcCabal
,
ghcPkg
,
ghcPrim
,
haskeline
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
primitive
,
process
,
stm
,
hoopl
,
hpc
,
integerGmp
,
integerSimple
,
parallel
,
pretty
,
primitive
,
process
,
templateHaskell
,
terminfo
,
time
,
transformers
,
unix
,
win32
,
xhtml
::
Package
stm
,
templateHaskell
,
terminfo
,
time
,
transformers
,
unix
,
win32
,
xhtml
::
Package
array
=
library
"array"
array
=
library
"array"
base
=
library
"base"
base
=
library
"base"
...
@@ -43,6 +43,7 @@ directory = library "directory"
...
@@ -43,6 +43,7 @@ directory = library "directory"
filepath
=
library
"filepath"
filepath
=
library
"filepath"
ghc
=
topLevel
"ghc-bin"
`
setPath
`
"ghc"
ghc
=
topLevel
"ghc-bin"
`
setPath
`
"ghc"
ghcCabal
=
utility
"ghc-cabal"
ghcCabal
=
utility
"ghc-cabal"
ghcPkg
=
utility
"ghc-pkg"
ghcPrim
=
library
"ghc-prim"
ghcPrim
=
library
"ghc-prim"
haskeline
=
library
"haskeline"
haskeline
=
library
"haskeline"
hoopl
=
library
"hoopl"
hoopl
=
library
"hoopl"
...
@@ -80,6 +81,7 @@ defaultProgramPath :: Stage -> Package -> Maybe FilePath
...
@@ -80,6 +81,7 @@ defaultProgramPath :: Stage -> Package -> Maybe FilePath
defaultProgramPath
stage
pkg
defaultProgramPath
stage
pkg
|
pkg
==
ghc
=
program
$
"ghc-stage"
++
show
(
fromEnum
stage
+
1
)
|
pkg
==
ghc
=
program
$
"ghc-stage"
++
show
(
fromEnum
stage
+
1
)
|
pkg
==
ghcCabal
=
program
$
pkgName
pkg
|
pkg
==
ghcCabal
=
program
$
pkgName
pkg
|
pkg
==
ghcPkg
=
program
$
pkgName
pkg
|
otherwise
=
Nothing
|
otherwise
=
Nothing
where
where
program
name
=
Just
$
pkgPath
pkg
-/-
defaultTargetDirectory
stage
pkg
program
name
=
Just
$
pkgPath
pkg
-/-
defaultTargetDirectory
stage
pkg
...
...
src/Settings/Packages.hs
View file @
bbc6e4a2
...
@@ -25,8 +25,8 @@ packagesStage1 :: Packages
...
@@ -25,8 +25,8 @@ packagesStage1 :: Packages
packagesStage1
=
mconcat
packagesStage1
=
mconcat
[
packagesStage0
[
packagesStage0
,
append
[
array
,
base
,
bytestring
,
containers
,
deepseq
,
directory
,
filepath
,
append
[
array
,
base
,
bytestring
,
containers
,
deepseq
,
directory
,
filepath
,
ghcCabal
,
ghcPrim
,
haskeline
,
integerLibrary
,
pretty
,
process
,
ghcCabal
,
ghcPkg
,
ghcPrim
,
haskeline
,
integerLibrary
,
pretty
,
time
]
,
process
,
time
]
,
windowsHost
?
append
[
win32
]
,
windowsHost
?
append
[
win32
]
,
notM
windowsHost
?
append
[
unix
]
,
notM
windowsHost
?
append
[
unix
]
,
buildHaddock
?
append
[
xhtml
]
]
,
buildHaddock
?
append
[
xhtml
]
]
...
...
Write
Preview
Supports
Markdown
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