Commit 3bac585e authored by Andrey Mokhov's avatar Andrey Mokhov

Update documentation

See #347, #440
parent a0ccea60
This diff is collapsed.
......@@ -2,6 +2,7 @@ module Flavour (Flavour (..)) where
import Expression
-- Please update doc/{flavours.md, user-settings.md} when changing this file.
-- | 'Flavour' is a collection of build settings that fully define a GHC build.
-- Note the following type semantics:
-- * @Bool@: a plain Boolean flag whose value is known at compile time.
......@@ -9,7 +10,7 @@ import Expression
-- * @Predicate@: a flag whose value can depend on the build environment and
-- on the current build target.
data Flavour = Flavour {
-- | Flavour name, to set from command line.
-- | Flavour name, to select this flavour from command line.
name :: String,
-- | Use these command line arguments.
args :: Args,
......
......@@ -12,16 +12,23 @@ import System.Console.ANSI
import Flavour
import Expression
import {-# SOURCE #-} Settings.Default
-- See doc/user-settings.md for instructions.
-- Please update doc/user-settings.md when committing changes to this file.
-- | All build results are put into the 'buildRoot' directory.
userBuildRoot :: BuildRoot
userBuildRoot = BuildRoot "_build"
-- | User defined build flavours. See 'defaultFlavour' as an example.
-- | User defined build flavours. See 'userFlavour' as an example.
userFlavours :: [Flavour]
userFlavours = []
userFlavours = [userFlavour] -- Add more build flavours if need be.
-- | This is an example user-defined build flavour. Feel free to modify it and
-- use by passing @--flavour=user@ from the command line.
userFlavour :: Flavour
userFlavour = defaultFlavour { name = "user" } -- Modify other settings here.
-- | Add user defined packages. Note, this only lets Hadrian know about the
-- existence of a new package; to actually build it you need to create a new
......
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