cabal-install-3.10.2.1: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Client.ProjectFlags

Synopsis

- data ProjectFlags = ProjectFlags {
  - flagProjectFileName :: Flag FilePath
  - flagIgnoreProject :: Flag Bool
  }
- defaultProjectFlags :: ProjectFlags
- projectFlagsOptions :: ShowOrParseArgs -> [OptionField ProjectFlags]
- removeIgnoreProjectOption :: [OptionField a] -> [OptionField a]

# Documentation

data ProjectFlags #

Constructors

ProjectFlags |
Fields flagProjectFileName :: Flag FilePath The cabal project file name; defaults to `cabal.project`. The name itself denotes the cabal project file name, but it also is the base of auxiliary project files, such as `cabal.project.local` and `cabal.project.freeze` which are also read and written out in some cases. If the path is not found in the current working directory, we will successively probe relative to parent directories until this name is found. flagIgnoreProject :: Flag Bool Whether to ignore the local project (i.e. don't search for cabal.project) The exact interpretation might be slightly different per command.

#### Instances

Instances details

Monoid ProjectFlags # |
Instance details Defined in Distribution.Client.ProjectFlags Methods mempty :: ProjectFlags # mappend :: ProjectFlags -> ProjectFlags -> ProjectFlags # mconcat :: [ProjectFlags] -> ProjectFlags #
Semigroup ProjectFlags # |
Instance details Defined in Distribution.Client.ProjectFlags Methods (<>) :: ProjectFlags -> ProjectFlags -> ProjectFlags # sconcat :: NonEmpty ProjectFlags -> ProjectFlags # stimes :: Integral b => b -> ProjectFlags -> ProjectFlags #
Generic ProjectFlags # |
Instance details Defined in Distribution.Client.ProjectFlags Associated Types
type Rep ProjectFlags |
Instance details Defined in Distribution.Client.ProjectFlags type Rep ProjectFlags = D1 ('MetaData "ProjectFlags" "Distribution.Client.ProjectFlags" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "ProjectFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "flagProjectFileName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath)) :*: S1 ('MetaSel ('Just "flagIgnoreProject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))))
Methods from :: ProjectFlags -> Rep ProjectFlags x # to :: Rep ProjectFlags x -> ProjectFlags #
Show ProjectFlags # |
Instance details Defined in Distribution.Client.ProjectFlags Methods showsPrec :: Int -> ProjectFlags -> ShowS # show :: ProjectFlags -> String # showList :: [ProjectFlags] -> ShowS #
type Rep ProjectFlags # |
Instance details Defined in Distribution.Client.ProjectFlags type Rep ProjectFlags = D1 ('MetaData "ProjectFlags" "Distribution.Client.ProjectFlags" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "ProjectFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "flagProjectFileName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath)) :*: S1 ('MetaSel ('Just "flagIgnoreProject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))))

defaultProjectFlags :: ProjectFlags #

projectFlagsOptions :: ShowOrParseArgs -> [OptionField ProjectFlags] #

removeIgnoreProjectOption :: [OptionField a] -> [OptionField a] #

As almost all commands use `ProjectFlags` but not all can honour "ignore-project" flag, provide this utility to remove the flag parsing from the help message.