4 ``cabal help`` groups commands into global, package, new-style project and
5 legacy sections. We talk in detail about some global and package commands.
10 Command line interface to the Haskell Cabal infrastructure.
12 See http://www.haskell.org/cabal/ for more information.
14 Usage: cabal [GLOBAL FLAGS] [COMMAND [FLAGS]]
18 update Updates list of known packages.
19 install Install packages.
20 help Help about commands.
23 configure Add extra project configuration.
24 build Compile targets within the project.
25 clean Clean the package store and remove temporary files.
27 run Run an executable.
28 repl Open an interactive session for the given component.
32 sdist Generate a source distribution file (.tar.gz).
34 freeze Freeze dependencies.
35 haddock Build Haddock documentation.
36 haddock-project Build Haddock documentation of local packages.
37 exec Give a command access to the store.
38 list-bin List path to a single executable.
40 [new-style projects (forwards-compatible aliases)]
41 Since cabal-install-3.0.0.0, all 'v2-' prefixed names of commands are just aliases for the simple unprefixed names.
42 So v2-build is an alias for build, v2-install for install and so on.
44 [legacy command aliases]
45 No legacy commands are described.
47 Common Arguments and Flags
48 --------------------------
50 Arguments and flags common to some or all commands are:
53 .. option:: --default-user-config=file
55 Allows a "default" ``cabal.config`` freeze file to be passed in
56 manually. This file will only be used if one does not exist in the
57 project directory already. Typically, this can be set from the
58 global cabal ``config`` file so as to provide a default set of
59 partial constraints to be used by projects, providing a way for
60 users to peg themselves to stable package collections.
63 .. option:: --allow-newer[=pkgs], --allow-older[=pkgs]
65 Selectively relax upper or lower bounds in dependencies without
66 editing the package description respectively.
68 The following description focuses on upper bounds and the
69 :option:`--allow-newer` flag, but applies analogously to
70 :option:`--allow-older` and lower bounds. :option:`--allow-newer`
71 and :option:`--allow-older` can be used at the same time.
73 If you want to install a package A that depends on B >= 1.0 && <
74 2.0, but you have the version 2.0 of B installed, you can compile A
75 against B 2.0 by using ``cabal install --allow-newer=B A``. This
76 works for the whole package index: if A also depends on C that in
77 turn depends on B < 2.0, C's dependency on B will be also relaxed.
85 Resolving dependencies...
86 cabal: Could not resolve dependencies:
88 $ cabal configure --allow-newer
89 Resolving dependencies...
96 # Relax upper bounds in all dependencies.
97 $ cabal install --allow-newer foo
99 # Relax upper bounds only in dependencies on bar, baz and quux.
100 $ cabal install --allow-newer=bar,baz,quux foo
102 # Relax the upper bound on bar and force bar==2.1.
103 $ cabal install --allow-newer=bar --constraint="bar==2.1" foo
105 It's also possible to limit the scope of :option:`--allow-newer` to single
106 packages with the ``--allow-newer=scope:dep`` syntax. This means
107 that the dependency on ``dep`` will be relaxed only for the package
114 # Relax upper bound in foo's dependency on base; also relax upper bound in
115 # every package's dependency on lens.
116 $ cabal install --allow-newer=foo:base,lens
118 # Relax upper bounds in foo's dependency on base and bar's dependency
119 # on time; also relax the upper bound in the dependency on lens specified by
121 $ cabal install --allow-newer=foo:base,lens --allow-newer=bar:time
123 Finally, one can enable :option:`--allow-newer` permanently by setting
124 ``allow-newer: True`` in the ``~/.cabal/config`` file. Enabling
125 'allow-newer' selectively is also supported in the config file
126 (``allow-newer: foo, bar, baz:base``).
128 .. option:: --preference=preference
130 Specify a soft constraint on versions of a package. The solver will
131 attempt to satisfy these preferences on a "best-effort" basis.
133 .. option:: --enable-build-info
135 Generate accurate build information for build components.
137 Information contains meta information, such as component type, compiler type, and
138 Cabal library version used during the build, but also fine grained information,
139 such as dependencies, what modules are part of the component, etc...
141 On build, a file ``build-info.json`` (in the ``json`` format) will be written to
142 the root of the build directory.
145 The format and fields of the generated build information is currently
146 experimental. In the future we might add or remove fields, depending
147 on the needs of other tooling.
152 "cabal-lib-version": "<cabal lib version>",
154 "flavour": "<compiler name>",
155 "compiler-id": "<compiler id>",
156 "path": "<absolute path of the compiler>"
160 "type": "<component type, e.g. lib | bench | exe | flib | test>",
161 "name": "<component name>",
162 "unit-id": "<unitid>",
164 "<compiler args necessary for compilation>"
167 "<modules in this component>"
170 "<source files relative to hs-src-dirs>"
173 "<source directories of this component>"
175 "src-dir": "<root directory of this component>",
176 "cabal-file": "<cabal file location>"
181 .. jsonschema:: ./json-schemas/build-info.schema.json
183 .. option:: --disable-build-info
185 (default) Do not generate detailed build information for built components.
187 Already generated `build-info.json` files will be removed since they would be stale otherwise.
193 ``cabal list-bin`` will either (a) display the path for a single executable or (b)
194 complain that the target doesn't resolve to a single binary. In the latter case,
195 it will name the binary products contained in the package. These products can
196 be used to narrow the search and get an actual path to a particular executable.
198 Example showing a failure to resolve to a single executable.
202 $ cabal list-bin cabal-install
203 cabal: The list-bin command is for finding a single binary at once. The
204 target 'cabal-install' refers to the package cabal-install-#.#.#.# which
205 includes the executable 'cabal', the test suite 'unit-tests', the test suite
206 'mem-use-tests', the test suite 'long-tests' and the test suite
207 'integration-tests2'.
209 For a scope that results in only one item we'll get a path.
213 $ cabal list-bin cabal-install:exes
214 /.../dist-newstyle/build/.../cabal/cabal
216 $ cabal list-bin cabal-install:cabal
217 /.../dist-newstyle/build/.../cabal/cabal
219 We can also scope to test suite targets as they produce binaries.
223 $ cabal list-bin cabal-install:tests
224 cabal: The list-bin command is for finding a single binary at once. The
225 target 'cabal-install:tests' refers to the test suites in the package
226 cabal-install-#.#.#.# which includes the test suite 'unit-tests', the test
227 suite 'mem-use-tests', the test suite 'long-tests' and the test suite
228 'integration-tests2'.
230 $ cabal list-bin cabal-install:unit-tests
231 /.../dist-newstyle/.../unit-tests/unit-tests
233 Note that ``cabal list-bin`` will print the executables' location, but
234 will not make sure that these executables actually exist (i.e., have
235 been successfully built). In order to determine the correct location,
236 it may invoke the configuration step (see ``cabal configure``).
241 ``cabal configure`` takes a set of arguments and writes a
242 ``cabal.project.local`` file based on the flags passed to this command.
243 ``cabal configure FLAGS; cabal build`` is roughly equivalent to
244 ``cabal build FLAGS``, except that with ``configure`` the flags
245 are persisted to all subsequent calls to ``build``.
247 ``cabal configure`` is intended to be a convenient way to write out
248 a ``cabal.project.local`` for simple configurations; e.g.,
249 ``cabal configure -w ghc-7.8`` would ensure that all subsequent
250 builds with ``cabal build`` are performed with the compiler
251 ``ghc-7.8``. For more complex configuration, we recommend writing the
252 ``cabal.project.local`` file directly (or placing it in
255 ``cabal configure`` inherits options from ``Cabal``. semantics:
257 - Any flag accepted by ``./Setup configure``.
259 - Any flag accepted by ``cabal configure`` beyond
260 ``./Setup configure``, namely ``--cabal-lib-version``,
261 ``--constraint``, ``--preference`` and ``--solver.``
263 - Any flag accepted by ``cabal install`` beyond ``./Setup configure``.
265 - Any flag accepted by ``./Setup haddock``.
267 The options of all of these flags apply only to *local* packages in a
268 project; this behavior is different than that of ``cabal install``,
269 which applies flags to every package that would be built. The motivation
270 for this is to avoid an innocuous addition to the flags of a package
271 resulting in a rebuild of every package in the store (which might need
272 to happen if a flag actually applied to every transitive dependency). To
273 apply options to an external package, use a ``package`` stanza in a
274 ``cabal.project`` file.
276 There are two ways of modifying the ``cabal.project.local`` file through
277 ``cabal configure``, either by appending new configurations to it, or
278 by simply overwriting it all. Overwriting is the default behaviour, as
279 such, there's a flag ``--enable-append`` to append the new configurations
280 instead. Since overwriting is rather destructive in nature, a backup system
281 is in place, which moves the old configuration to a ``cabal.project.local~``
282 file, this feature can also be disabled by using the ``--disable-backup``
289 ``cabal update`` updates the state of the package index. If the
290 project contains multiple remote package repositories it will update
291 the index of all of them (e.g. when using overlays).
297 $ cabal update # update all remote repos
298 $ cabal update head.hackage # update only head.hackage
303 A cabal command target can take any of the following forms:
305 - A package target: ``package``, which specifies that all enabled
306 components of a package to be built. By default, test suites and
307 benchmarks are *not* enabled, unless they are explicitly requested
308 (e.g., via ``--enable-tests``.)
310 - A component target: ``[package:][ctype:]component``, which specifies
311 a specific component (e.g., a library, executable, test suite or
312 benchmark) to be built.
314 - All packages: ``all``, which specifies all packages within the project.
316 - Components of a particular type: ``package:ctypes``, ``all:ctypes``:
317 which specifies all components of the given type. Where valid
320 - ``libs``, ``libraries``,
321 - ``flibs``, ``foreign-libraries``,
322 - ``exes``, ``executables``,
324 - ``benches``, ``benchmarks``.
326 - A module target: ``[package:][ctype:]module``, which specifies that the
327 component of which the given module is a part of will be built.
329 - A filepath target: ``[package:][ctype:]filepath``, which specifies that the
330 component of which the given filepath is a part of will be built.
332 - A script target: ``path/to/script``, which specifies the path to a script
333 file. This is supported by ``build``, ``repl``, ``run``, and ``clean``.
334 Script targets are not part of a package.
339 ``cabal build`` takes a set of targets and builds them. It
340 automatically handles building and installing any dependencies of these
343 In component targets, ``package:`` and ``ctype:`` (valid component types
344 are ``lib``, ``flib``, ``exe``, ``test`` and ``bench``) can be used to
345 disambiguate when multiple packages define the same component, or the
346 same component name is used in a package (e.g., a package ``foo``
347 defines both an executable and library named ``foo``). We always prefer
348 interpreting a target as a package name rather than as a component name.
350 Some example targets:
354 $ cabal build lib:foo-pkg # build the library named foo-pkg
355 $ cabal build foo-pkg:foo-tests # build foo-tests in foo-pkg
356 $ cabal build src/Lib.s # build the library component to
357 # which "src/Lib.hs" belongs
358 $ cabal build app/Main.hs # build the executable component of
360 $ cabal build Lib # build the library component to
361 # which the module "Lib" belongs
362 $ cabal build path/to/script # build the script as an executable
364 Beyond a list of targets, ``cabal build`` accepts all the flags that
365 ``cabal configure`` takes. Most of these flags are only taken into
366 consideration when building local packages; however, some flags may
367 cause extra store packages to be built (for example,
368 ``--enable-profiling`` will automatically make sure profiling libraries
369 for all transitive dependencies are built and installed.)
371 When building a script, the executable is cached under the cabal directory.
372 See ``cabal run`` for more information on scripts.
374 In addition ``cabal build`` accepts these flags:
376 .. option:: --only-configure
378 When given we will forego performing a full build and abort after running
379 the configure phase of each target package.
385 ``cabal repl TARGET`` loads all of the modules of the target into
386 GHCi as interpreted bytecode. In addition to ``cabal build``'s flags,
387 it additionally takes the ``--repl-options`` and ``--repl-no-load`` flags.
389 To avoid ``ghci`` specific flags from triggering unneeded global rebuilds these
390 flags are now stripped from the internal configuration. As a result
391 ``--ghc-options`` will no longer (reliably) work to pass flags to ``ghci`` (or
392 other repls). Instead, you should use the new ``--repl-options`` flag to
393 specify these options to the invoked repl. (This flag also works on ``cabal
394 repl`` and ``Setup repl`` on sufficiently new versions of Cabal.)
396 The ``repl-no-load`` flag disables the loading of target modules at startup.
398 Currently, it is not supported to pass multiple targets to ``repl``
399 (``repl`` will just successively open a separate GHCi session for
402 It also provides a way to experiment with libraries without needing to download
403 them manually or to install them globally.
405 This command opens a REPL with the current default target loaded, and a version
406 of the ``vector`` package matching that specification exposed.
410 $ cabal repl --build-depends "vector >= 0.12 && < 0.13"
412 Both of these commands do the same thing as the above, but only exposes ``base``,
413 ``vector``, and the ``vector`` package's transitive dependencies even if the user
414 is in a project context.
418 $ cabal repl --ignore-project --build-depends "vector >= 0.12 && < 0.13"
419 $ cabal repl --project='' --build-depends "vector >= 0.12 && < 0.13"
421 This command would add ``vector``, but not (for example) ``primitive``, because
422 it only includes the packages specified on the command line (and ``base``, which
423 cannot be excluded for technical reasons).
427 $ cabal repl --build-depends vector --no-transitive-deps
429 ``repl`` can open scripts by passing the path to the script as the target.
433 $ cabal repl path/to/script
435 The configuration information for the script is cached under the cabal directory
436 and can be pre-built with ``cabal build path/to/script``.
437 See ``cabal run`` for more information on scripts.
442 ``cabal run [TARGET [ARGS]]`` runs the executable specified by the
443 target, which can be a component, a package or can be left blank, as
444 long as it can uniquely identify an executable within the project.
445 Tests and benchmarks are also treated as executables.
447 See `the build section <#cabal-build>`__ for the target syntax.
449 When ``TARGET`` is one of the following:
451 - A component target: execute the specified executable, benchmark or test suite.
454 1. If the package has exactly one executable component, it will be selected.
455 2. If the package has multiple executable components, an error is raised.
456 3. If the package has exactly one test or benchmark component, it will be selected.
457 4. Otherwise an issue is raised.
459 - The path to a script: execute the script at the path.
461 - Empty target: Same as package target, implicitly using the package from the current
464 Except in the case of the empty target, the strings after it will be
465 passed to the executable as arguments.
467 If one of the arguments starts with ``-`` it will be interpreted as
468 a cabal flag, so if you need to pass flags to the executable you
469 have to separate them with ``--``.
473 $ cabal run target -- -a -bcd --argument
475 ``run`` supports running script files that use a certain format.
482 build-depends: base ^>= 4.14
486 with-compiler: ghc-8.10.7
493 Where there cabal metadata block is mandatory and contains fields from a
494 package executable block, and the project metadata block is optional and
495 contains fields that would be in the cabal.project file in a regular project.
497 Only some fields are supported in the metadata blocks, and these fields are
498 currently not validated. See
499 `#8024 <https://github.com/haskell/cabal/issues/8024>`__ for details.
501 A script can either be executed directly using `cabal` as an interpreter or
506 $ cabal run path/to/script
508 The executable is cached under the cabal directory, and can be pre-built with
509 ``cabal build path/to/script`` and the cache can be removed with
510 ``cabal clean path/to/script``.
512 A note on targets: Whenever a command takes a script target and it matches the
513 name of another target, the other target is preferred. To load the script
514 instead pass it as an explicit path: ./script
516 By default, scripts are run at silent verbosity (``--verbose=0``). To show the
517 build output for a script either use the command
521 $ cabal run --verbose=n path/to/script
523 or the interpreter line
527 #!/usr/bin/env -S cabal run --verbose=n
529 For more information see :cfg-field:`verbose`
534 ``cabal freeze`` writes out a **freeze file** which records all of
535 the versions and flags that are picked by the solver under the
536 current index and flags. Default name of this file is
537 ``cabal.project.freeze`` but in combination with a
538 ``--project-file=my.project`` flag (see :ref:`project-file
539 <cmdoption-project-file>`)
540 the name will be ``my.project.freeze``.
541 A freeze file has the same syntax as ``cabal.project`` and looks
548 constraints: HTTP ==4000.3.3,
549 HTTP +warp-tests -warn-as-error -network23 +network-uri -mtl1 -conduit10,
551 QuickCheck +templatehaskell,
555 For end-user executables, it is recommended that you distribute the
556 ``cabal.project.freeze`` file in your source repository so that all
557 users see a consistent set of dependencies. For libraries, this is not
558 recommended: users often need to build against different versions of
559 libraries than what you developed against.
564 ``cabal bench [TARGETS] [OPTIONS]`` runs the specified benchmarks
565 (all the benchmarks in the current package by default), first ensuring
571 ``cabal test [TARGETS] [OPTIONS]`` runs the specified test suites
572 (all the test suites in the current package by default), first ensuring
578 ``cabal haddock [FLAGS] [TARGET]`` builds Haddock documentation for
579 the specified packages within the project.
581 If a target is not a library :cfg-field:`haddock-benchmarks`,
582 :cfg-field:`haddock-executables`, :cfg-field:`haddock-internal`,
583 :cfg-field:`haddock-tests` will be implied as necessary.
585 cabal haddock-project
586 ---------------------
588 ``cabal haddock-project [FLAGS]`` builds Haddock documentation for all local
589 packages specified in the project.
591 By default the documentation will be put in ``./haddocks`` folder, this can be
592 modified with the ``--output`` flag.
594 This command supports two primary modes: building a self contained directory
595 (by specifying ``--local`` flag) or documentation that links to hackage (with
596 ``--hackage`` flag). Both options imply: ``--quickjump``, ``--gen-index``,
597 ``--gen-contents`` and ``--hyperlinked-source``.
599 If neither ``--local`` nor ``--hackage`` option is specified a self contained
600 directory will only be build if ``--html-location`` is not specified.
602 In both cases the html index as well as quickjump index will include all terms
603 and types defined in any of the local packages, but not ones that are included
604 in any of the dependencies. But note that if you navigate to a dependency,
605 you will have access to its quickjump index.
607 The generated landing page will contain one tree of all modules per local
613 ``cabal check [FLAGS]`` checks the package for common mistakes (e.g.: if
614 it is missing important fields like ``synopsis``, if it is using
615 tricky GHC options, etc.).
617 Run ``cabal check`` in the folder where your ``.cabal`` package file is.
619 .. option:: -v, --verbose[=n]
621 Set verbosity level (0–3, default is 1).
623 ``cabal check`` mimics Hackage's requirements: if no error or warning
624 is reported, Hackage should accept your package.
629 ``cabal exec [FLAGS] [--] COMMAND [--] [ARGS]`` runs the specified command
630 using the project's environment. That is, passing the right flags to compiler
631 invocations and bringing the project's executables into scope.
636 ``cabal install [FLAGS] [TARGETS]`` builds the specified target packages and
637 symlinks/copies their executables in ``installdir`` (usually ``~/.cabal/bin``).
641 If not every package has an executable to install, use ``all:exes`` rather
642 than ``all`` as the target. To overwrite an installation, use
643 ``--overwrite-policy=always`` as the default policy is ``never``.
645 For example this command will build the latest ``cabal-install`` and symlink
646 its ``cabal`` executable:
650 $ cabal install cabal-install
652 In addition, it's possible to use ``cabal install`` to install components
653 of a local project. For example, with an up-to-date Git clone of the Cabal
654 repository, this command will build cabal-install HEAD and symlink the
655 ``cabal`` executable:
659 $ cabal install exe:cabal
661 Where symlinking is not possible (eg. on some Windows versions) the ``copy``
662 method is used by default. You can specify the install method
663 by using ``--install-method`` flag:
667 $ cabal install exe:cabal --install-method=copy --installdir=$HOME/bin
669 Note that copied executables are not self-contained, since they might use
670 data-files from the store.
672 .. _adding-libraries:
674 Adding libraries to GHC package environments
675 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
677 It is also possible to "install" libraries using the ``--lib`` flag. For
678 example, this command will build the latest Cabal library and install it:
682 $ cabal install --lib Cabal
684 This works by managing GHC package environment files. By default, it is writing
685 to the global environment in ``~/.ghc/$ARCH-$OS-$GHCVER/environments/default``.
686 ``install`` provides the ``--package-env`` flag to control which of these
687 environments is modified.
689 This command will modify the environment file in the current directory:
693 $ cabal install --lib Cabal --package-env .
695 This command will modify the environment file in the ``~/foo`` directory:
699 $ cabal install --lib Cabal --package-env foo/
701 Do note that the results of the previous two commands will be overwritten by
702 the use of other style commands, so it is not recommended to use them inside
705 This command will modify the environment in the ``local.env`` file in the
710 $ cabal install --lib Cabal --package-env local.env
712 This command will modify the ``myenv`` named global environment:
716 $ cabal install --lib Cabal --package-env myenv
718 If you wish to create a named environment file in the current directory where
719 the name does not contain an extension, you must reference it as ``./myenv``.
721 You can learn more about how to use these environments in `this section of the
722 GHC manual <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/packages.html#package-environments>`_.
727 ``cabal clean [FLAGS]`` cleans up the temporary files and build artifacts
728 stored in the ``dist-newstyle`` folder.
730 By default, it removes the entire folder, but it can also spare the configuration
731 and caches if the ``--save-config`` option is given, in which case it only removes
732 the build artefacts (``.hi``, ``.o`` along with any other temporary files generated
733 by the compiler, along with the build output).
735 ``cabal clean [FLAGS] path/to/script`` cleans up the temporary files and build
736 artifacts for the script, which are stored under the .cabal/script-builds directory.
738 In addition when clean is invoked it will remove all script build artifacts for
739 which the corresponding script no longer exists.
744 ``cabal sdist [FLAGS] [TARGETS]`` takes the crucial files needed to build ``TARGETS``
745 and puts them into an archive format ready for upload to Hackage. These archives are stable
746 and two archives of the same format built from the same source will hash to the same value.
748 ``cabal sdist`` takes the following flags:
750 .. option:: -l, --list-only
752 Rather than creating an archive, lists files that would be included.
754 Output is to ``stdout`` by default. The file paths are relative to the project's root
757 .. option:: -o, --output-directory
759 Sets the output dir, if a non-default one is desired. The default is
760 ``dist-newstyle/sdist/``. ``--output-directory -`` will send output to ``stdout``
761 unless multiple archives are being created.
763 .. option:: --null-sep
765 Only used with ``--list-only``. Separates filenames with a NUL
766 byte instead of newlines.
768 ``sdist`` is inherently incompatible with sdist hooks (which were removed in `Cabal-3.0`),
769 not due to implementation but due to fundamental core invariants
770 (same source code should result in the same tarball, byte for byte)
771 that must be satisfied for it to function correctly in the larger build ecosystem.
772 ``autogen-modules`` is able to replace uses of the hooks to add generated modules, along with
773 the custom publishing of Haddock documentation to Hackage.
778 ``cabal gen-bounds [FLAGS]`` generates bounds for all dependencies that do not
779 currently have them. Generated bounds are printed to stdout. You can then
780 paste them into your .cabal file.
782 See `the section on generating dependency version bounds <cabal-package.html#generating-dependency-version-bounds>`__ for more details and examples.
787 ``cabal outdated [FLAGS]`` checks for outdated dependencies in the package
788 description file or freeze file.
790 ``cabal outdated`` supports the following flags:
792 .. option:: --v1-freeze-file
794 Read dependency version bounds from the freeze file.
796 (``cabal.config``) instead of the package description file
797 (``$PACKAGENAME.cabal``).
799 .. option:: --v2-freeze-file
803 Read dependency version bounds from the v2-style freeze file
804 (by default, ``cabal.project.freeze``) instead of the package
805 description file. ``--new-freeze-file`` is an alias for this flag
806 that can be used with pre-2.4 ``cabal``.
808 .. option:: --project-file PROJECTFILE
812 Read dependendency version bounds from the v2-style freeze file
813 related to the named project file (i.e., ``$PROJECTFILE.freeze``)
814 instead of the package desctription file. If multiple ``--project-file``
815 flags are provided, only the final one is considered. This flag
816 must only be passed in when ``--new-freeze-file`` is present.
818 .. option:: --simple-output
820 Print only the names of outdated dependencies, one per line.
822 .. option:: --exit-code
824 Exit with a non-zero exit code when there are outdated dependencies.
826 .. option:: -q, --quiet
828 Don't print any output. Implies ``-v0`` and ``--exit-code``.
830 .. option:: --ignore PACKAGENAMES
832 Don't warn about outdated dependency version bounds for the packages in this list.
834 .. option:: --minor [PACKAGENAMES]
836 Ignore major version bumps for these packages.
838 E.g. if there's a version 2.0 of a package ``pkg`` on Hackage and the freeze
839 file specifies the constraint ``pkg == 1.9``, ``cabal outdated --freeze
840 --minor=pkg`` will only consider the ``pkg`` outdated when there's a version
841 of ``pkg`` on Hackage satisfying ``pkg > 1.9 && < 2.0``. ``--minor`` can also
842 be used without arguments, in that case major version bumps are ignored for
845 See `the section on listing outdated dependency version bounds <cabal-package.html#listing-outdated-dependency-version-bounds>`__ for more details and examples.