Commit 4ade862d authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Decompose Settings/Builders/Haddock.hs (see #60).

parent 49521c02
...@@ -43,19 +43,11 @@ haddockArgs = builder Haddock ? do ...@@ -43,19 +43,11 @@ haddockArgs = builder Haddock ? do
arg "--source-module=src/%{MODULE/./-}.html" arg "--source-module=src/%{MODULE/./-}.html"
, specified HsColour ? , specified HsColour ?
arg "--source-entity=src/%{MODULE/./-}.html\\#%{NAME}" arg "--source-entity=src/%{MODULE/./-}.html\\#%{NAME}"
, customPackageArgs
, append =<< getInputs , append =<< getInputs
, arg "+RTS" , arg "+RTS"
, arg $ "-t" ++ path -/- "haddock.t" , arg $ "-t" ++ path -/- "haddock.t"
, arg "--machine-readable" ] , arg "--machine-readable"
, arg "-RTS" ]
customPackageArgs :: Args
customPackageArgs = mconcat
[ package compiler ? stage1 ?
arg "--optghc=-DSTAGE=2" ]
-- TODO: move to getPackageSources
-- , package ghcPrim ? stage1 ?
-- arg "libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs" ]
-- From ghc.mk: -- From ghc.mk:
-- # ----------------------------------------------- -- # -----------------------------------------------
......
...@@ -5,7 +5,7 @@ import Expression ...@@ -5,7 +5,7 @@ import Expression
import GHC (compiler) import GHC (compiler)
import Oracles.Config.Setting import Oracles.Config.Setting
import Oracles.Config.Flag import Oracles.Config.Flag
import Predicates (builder, builderGhc, package, notStage0) import Predicates (builder, builderGhc, package, notStage0, stage1)
import Settings import Settings
compilerPackageArgs :: Args compilerPackageArgs :: Args
...@@ -36,4 +36,6 @@ compilerPackageArgs = package compiler ? do ...@@ -36,4 +36,6 @@ compilerPackageArgs = package compiler ? do
ghciWithDebugger ? ghciWithDebugger ?
notStage0 ? arg "--ghc-option=-DDEBUGGER" notStage0 ? arg "--ghc-option=-DDEBUGGER"
, ghcProfiled ? , ghcProfiled ?
notStage0 ? arg "--ghc-pkg-option=--force" ] ] notStage0 ? arg "--ghc-pkg-option=--force" ]
, builder Haddock ? stage1 ? arg "--optghc=-DSTAGE=2" ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment