Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
7792fbbe
Commit
7792fbbe
authored
Aug 16, 2017
by
Andrey Mokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor revision
parent
1ade8854
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
src/Expression.hs
src/Expression.hs
+11
-2
src/GHC.hs
src/GHC.hs
+5
-1
src/Settings.hs
src/Settings.hs
+0
-13
No files found.
src/Expression.hs
View file @
7792fbbe
...
...
@@ -16,8 +16,8 @@ module Expression (
Context
,
vanillaContext
,
stageContext
,
Target
,
-- * Convenient accessors
getBuildRoot
,
getBuildPath
,
getContext
,
get
Stage
,
getPackage
,
getBuilder
,
getOutputs
,
getInputs
,
getWay
,
getInput
,
getOutput
,
getBuildRoot
,
getBuildPath
,
getContext
,
get
PkgData
,
getPkgDataList
,
getStage
,
getPackage
,
getBuilder
,
getOutputs
,
getInputs
,
getWay
,
getInput
,
getOutput
,
-- * Re-exports
module
Base
...
...
@@ -28,6 +28,7 @@ import Hadrian.Expression hiding (Expr, Predicate, Args)
import
Base
import
Context
(
Context
,
vanillaContext
,
stageContext
,
getBuildPath
,
getStage
,
getPackage
,
getWay
)
import
Oracles.PackageData
import
Target
hiding
(
builder
,
inputs
,
outputs
)
-- | @Expr a@ is a computation that produces a value of type @Action a@ and can
...
...
@@ -42,6 +43,14 @@ type Args = H.Args Context Builder
type
Packages
=
Expr
[
Package
]
type
Ways
=
Expr
[
Way
]
-- | Get a value from the @package-data.mk@ file of the current context.
getPkgData
::
(
FilePath
->
PackageData
)
->
Expr
String
getPkgData
key
=
expr
.
pkgData
.
key
=<<
getBuildPath
-- | Get a list of values from the @package-data.mk@ file of the current context.
getPkgDataList
::
(
FilePath
->
PackageDataList
)
->
Expr
[
String
]
getPkgDataList
key
=
expr
.
pkgDataList
.
key
=<<
getBuildPath
-- | Is the build currently in the provided stage?
stage
::
Stage
->
Predicate
stage
s
=
(
s
==
)
<$>
getStage
...
...
src/GHC.hs
View file @
7792fbbe
...
...
@@ -18,7 +18,7 @@ module GHC (
rtsContext
,
rtsBuildPath
,
rtsConfIn
,
-- * Miscellaneous
ghcSplitPath
,
stripCmdPath
,
inplaceInstallPath
ghcSplitPath
,
stripCmdPath
,
inplaceInstallPath
,
buildDll0
)
where
import
Base
...
...
@@ -192,3 +192,7 @@ rtsBuildPath = buildPath rtsContext
rtsConfIn
::
FilePath
rtsConfIn
=
pkgPath
rts
-/-
"package.conf.in"
buildDll0
::
Context
->
Action
Bool
buildDll0
Context
{
..
}
=
do
windows
<-
windowsHost
return
$
windows
&&
stage
==
Stage1
&&
package
==
compiler
src/Settings.hs
View file @
7792fbbe
...
...
@@ -13,8 +13,6 @@ import CommandLine
import
Expression
import
Flavour
import
GHC
import
Oracles.PackageData
import
Oracles.Setting
import
{-#
SOURCE
#-
}
Settings
.
Default
import
Settings.Flavours.Development
import
Settings.Flavours.Performance
...
...
@@ -38,12 +36,6 @@ getPackages = expr flavour >>= packages
stagePackages
::
Stage
->
Action
[
Package
]
stagePackages
stage
=
interpretInContext
(
stageContext
stage
)
getPackages
getPkgData
::
(
FilePath
->
PackageData
)
->
Expr
String
getPkgData
key
=
expr
.
pkgData
.
key
=<<
getBuildPath
getPkgDataList
::
(
FilePath
->
PackageDataList
)
->
Expr
[
String
]
getPkgDataList
key
=
expr
.
pkgDataList
.
key
=<<
getBuildPath
hadrianFlavours
::
[
Flavour
]
hadrianFlavours
=
[
defaultFlavour
,
developmentFlavour
Stage1
,
developmentFlavour
Stage2
...
...
@@ -154,8 +146,3 @@ stage1Only = defaultStage1Only
-- | Install's DESTDIR setting.
destDir
::
FilePath
destDir
=
defaultDestDir
buildDll0
::
Context
->
Action
Bool
buildDll0
Context
{
..
}
=
do
windows
<-
windowsHost
return
$
windows
&&
stage
==
Stage1
&&
package
==
compiler
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