[commit: ghc] wip/nfs-locking: Add Haddock builder. (30687f3)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:04:29 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/30687f35a0f3ec3cdd488f2f55c0eaf626211ea2/ghc
>---------------------------------------------------------------
commit 30687f35a0f3ec3cdd488f2f55c0eaf626211ea2
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Wed Aug 19 02:35:56 2015 +0100
Add Haddock builder.
>---------------------------------------------------------------
30687f35a0f3ec3cdd488f2f55c0eaf626211ea2
src/Builder.hs | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/src/Builder.hs b/src/Builder.hs
index b175fac..ac184d3 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -19,12 +19,13 @@ import GHC.Generics
-- Ghc StageN, N > 0, is the one built on stage (N - 1)
-- GhcPkg Stage0 is the bootstrapping GhcPkg
-- GhcPkg StageN, N > 0, is the one built on stage 0 (TODO: need only Stage1?)
--- TODO: add Cpp and Haddock builders
+-- TODO: add Cpp builders
-- TODO: rename Gcc to Cc?
data Builder = Ar
| Ld
| Alex
| Happy
+ | Haddock
| HsColour
| GhcCabal
| Gcc Stage
@@ -32,28 +33,33 @@ data Builder = Ar
| GhcM Stage
| GccM Stage
| GhcPkg Stage
+ | GhcCabalHsColour
deriving (Show, Eq, Generic)
-- Configuration files refer to Builders as follows:
+-- TODO: determine paths to utils without looking up configuration files
builderKey :: Builder -> String
builderKey builder = case builder of
- Ar -> "ar"
- Ld -> "ld"
- Alex -> "alex"
- Happy -> "happy"
- HsColour -> "hscolour"
- GhcCabal -> "ghc-cabal"
- Ghc Stage0 -> "system-ghc"
- Ghc Stage1 -> "ghc-stage1"
- Ghc Stage2 -> "ghc-stage2"
- Ghc Stage3 -> "ghc-stage3"
- Gcc Stage0 -> "system-gcc"
- Gcc _ -> "gcc"
- GhcPkg Stage0 -> "system-ghc-pkg"
- GhcPkg _ -> "ghc-pkg"
- -- GhcM is currently a synonym for Ghc (to be called with -M flag)
- GhcM stage -> builderKey $ Ghc stage
- GccM stage -> builderKey $ Gcc stage
+ Ar -> "ar"
+ Ld -> "ld"
+ Alex -> "alex"
+ Happy -> "happy"
+ Haddock -> "haddock"
+ HsColour -> "hscolour"
+ GhcCabal -> "ghc-cabal"
+ Ghc Stage0 -> "system-ghc"
+ Ghc Stage1 -> "ghc-stage1"
+ Ghc Stage2 -> "ghc-stage2"
+ Ghc Stage3 -> "ghc-stage3"
+ Gcc Stage0 -> "system-gcc"
+ Gcc _ -> "gcc"
+ GhcPkg Stage0 -> "system-ghc-pkg"
+ GhcPkg _ -> "ghc-pkg"
+ -- GhcM/GccM are synonyms for Ghc/Gcc (called with -M and -MM flags)
+ GhcM stage -> builderKey $ Ghc stage
+ GccM stage -> builderKey $ Gcc stage
+ -- GhcCabalHsColour is a synonym for GhcCabal (called in hscolour mode)
+ GhcCabalHsColour -> builderKey $ GhcCabal
builderPath :: Builder -> Action String
builderPath builder = do
More information about the ghc-commits
mailing list