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
d1fb3de6
Commit
d1fb3de6
authored
Feb 02, 2016
by
Andrey Mokhov
Browse files
Sort list items.
See
#200
.
parent
e5e72217
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Rules/Generate.hs
View file @
d1fb3de6
...
...
@@ -21,11 +21,11 @@ import Rules.Resources (Resources)
import
Settings
installTargets
::
[
FilePath
]
installTargets
=
[
"inplace/lib/template-hsc.h"
installTargets
=
[
"inplace/lib/ghc-usage.txt"
,
"inplace/lib/ghci-usage.txt"
,
"inplace/lib/platformConstants"
,
"inplace/lib/settings"
,
"inplace/lib/ghc-usage.txt"
,
"inplace/lib/ghci-usage.txt"
]
,
"inplace/lib/template-hsc.h"
]
primopsSource
::
FilePath
primopsSource
=
"compiler/prelude/primops.txt.pp"
...
...
@@ -45,8 +45,8 @@ includesDependencies = ("includes" -/-) <$>
ghcPrimDependencies
::
Stage
->
[
FilePath
]
ghcPrimDependencies
stage
=
((
targetPath
stage
ghcPrim
-/-
"build"
)
-/-
)
<$>
[
"GHC/Prim
opWrappers
.hs"
,
"
autogen/
GHC/Prim.hs"
]
[
"
autogen/
GHC/Prim.hs"
,
"GHC/Prim
opWrappers
.hs"
]
derivedConstantsPath
::
FilePath
derivedConstantsPath
=
"includes/dist-derivedconstants/header"
...
...
@@ -54,9 +54,9 @@ derivedConstantsPath = "includes/dist-derivedconstants/header"
derivedConstantsDependencies
::
[
FilePath
]
derivedConstantsDependencies
=
installTargets
++
fmap
(
derivedConstantsPath
-/-
)
[
"DerivedConstants.h"
,
"GHCConstantsHaskellExports.hs"
,
"GHCConstantsHaskellType.hs"
,
"GHCConstantsHaskellWrappers.hs"
,
"GHCConstantsHaskellExports.hs"
]
,
"GHCConstantsHaskellWrappers.hs"
]
compilerDependencies
::
Stage
->
[
FilePath
]
compilerDependencies
stage
=
...
...
@@ -66,21 +66,21 @@ compilerDependencies stage =
++
filter
(
const
$
stage
>
Stage0
)
libffiDependencies
++
derivedConstantsDependencies
++
fmap
((
targetPath
stage
compiler
-/-
"build"
)
-/-
)
[
"primop-vector-uniques.hs-incl"
[
"primop-can-fail.hs-incl"
,
"primop-code-size.hs-incl"
,
"primop-commutable.hs-incl"
,
"primop-data-decl.hs-incl"
,
"primop-tag.hs-incl"
,
"primop-list.hs-incl"
,
"primop-strictness.hs-incl"
,
"primop-fixity.hs-incl"
,
"primop-primop-info.hs-incl"
,
"primop-out-of-line.hs-incl"
,
"primop-has-side-effects.hs-incl"
,
"primop-can-fail.hs-incl"
,
"primop-code-size.hs-incl"
,
"primop-commutable.hs-incl"
,
"primop-vector-tys-exports.hs-incl"
,
"primop-list.hs-incl"
,
"primop-out-of-line.hs-incl"
,
"primop-primop-info.hs-incl"
,
"primop-strictness.hs-incl"
,
"primop-tag.hs-incl"
,
"primop-vector-tycons.hs-incl"
,
"primop-vector-tys.hs-incl"
]
,
"primop-vector-tys-exports.hs-incl"
,
"primop-vector-tys.hs-incl"
,
"primop-vector-uniques.hs-incl"
]
-- TODO: Turn this into a FilePaths expression
generatedDependencies
::
Stage
->
Package
->
[
FilePath
]
...
...
@@ -139,8 +139,8 @@ generatePackageCode _ target @ (PartialTarget stage pkg) =
-- TODO: why different folders for generated files?
fmap
(
buildPath
-/-
)
[
"GHC/Prim
opWrappers
.hs"
,
"
autogen/
GHC/Prim.hs"
[
"
autogen/
GHC/Prim.hs"
,
"GHC/Prim
opWrappers
.hs"
,
"*.hs-incl"
]
|%>
\
file
->
do
need
[
primopsTxt
stage
]
build
$
fullTarget
target
GenPrimopCode
[
primopsTxt
stage
]
[
file
]
...
...
@@ -164,11 +164,11 @@ generatePackageCode _ target @ (PartialTarget stage pkg) =
copyRules
::
Rules
()
copyRules
=
do
"inplace/lib/template-hsc.h"
<~
pkgPath
hsc2hs
"inplace/lib/platformConstants"
<~
derivedConstantsPath
"inplace/lib/settings"
<~
"."
"inplace/lib/ghc-usage.txt"
<~
"driver"
"inplace/lib/ghci-usage.txt"
<~
"driver"
"inplace/lib/platformConstants"
<~
derivedConstantsPath
"inplace/lib/settings"
<~
"."
"inplace/lib/template-hsc.h"
<~
pkgPath
hsc2hs
where
file
<~
dir
=
file
%>
\
_
->
copyFile
(
dir
-/-
takeFileName
file
)
file
...
...
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