summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Builders/GhcPkg.hs
blob: ba705c6892a54c7be9e973d4ab56b9dda557e41b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Settings.Builders.GhcPkg (ghcPkgBuilderArgs) where

import Settings.Builders.Common

ghcPkgBuilderArgs :: Args
ghcPkgBuilderArgs = mconcat
    [ builder (GhcPkg Init) ? mconcat [ arg "init", arg =<< getOutput ]

    , builder (GhcPkg Update) ? do
        verbosity <- expr getVerbosity
        context   <- getContext
        config    <- expr $ pkgInplaceConfig context
        mconcat [ arg "update"
                , arg "--force"
                , verbosity < Chatty ? arg "-v0"
                , bootPackageDatabaseArgs
                , arg config ] ]