From 00ec098635b99238e12821feb67d04733dc97b80 Mon Sep 17 00:00:00 2001 From: Bertram Felgenhauer <int-e@gmx.de> Date: Sun, 7 Sep 2014 13:23:41 +0200 Subject: [PATCH] Document cabal install --constraint. --- Cabal/doc/installing-packages.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cabal/doc/installing-packages.markdown b/Cabal/doc/installing-packages.markdown index ca881e51e2..48c1e60d5c 100644 --- a/Cabal/doc/installing-packages.markdown +++ b/Cabal/doc/installing-packages.markdown @@ -755,6 +755,16 @@ be controlled with the following command line options. It's also possible to enable `--allow-newer` permanently by setting `allow-newer: True` in the `~/.cabal/config` file. +`--constraint=`_constraint_ +: Restrict solutions involving a package to a given version range. + For example, `cabal install --constraint="bar==2.1"` will only consider + install plans that do not use `bar` at all, or `bar` of version 2.1. + + As a special case, `cabal install --constraint="bar -none"` prevents + `bar` from being used at all. (`-none` abbreviates `> 1 && < 1`) + `cabal install --constraint="bar installed"` prevents reinstallation + of the `bar` package. + ## setup build ## Perform any preprocessing or compilation needed to make this package ready for installation. -- GitLab