Distribution.Client.ProjectFlags

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

Safe Haskell | None
Language | Haskell2010

Distribution.Client.ProjectFlags

Synopsis

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

# Documentation

data ProjectFlags #

Constructors

ProjectFlags |
Fields flagProjectDir :: Flag FilePath The project directory. flagProjectFile :: Flag FilePath The cabal project file path; defaults to `cabal.project`. This path, when relative, is relative to the project directory. The filename portion of the path 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 a project directory was not specified, and 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.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ProjectFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "flagProjectDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath)) :*: (S1 ('MetaSel ('Just "flagProjectFile") '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.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ProjectFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "flagProjectDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath)) :*: (S1 ('MetaSel ('Just "flagProjectFile") '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.