Commit 36bfab36 authored by Alexis Williams's avatar Alexis Williams

Add documentation

[ci skip]
parent 6a545fa7
......@@ -371,6 +371,33 @@ Currently, it is not supported to pass multiple targets to ``new-repl``
(``new-repl`` will just successively open a separate GHCi session for
each target.)
It also provides a way to experiment with libraries without needing to download
them manually or to install them globally.
This command opens a REPL with the current default target loaded, and a version
of the ``vector`` package matching that specification exposed.
::
$ cabal new-repl --build-depends "vector >= 0.12 && < 0.13"
Both of these commands do the same thing as the above, but only exposes ``base``,
``vector``, and the``vector`` package's transitive dependencies even if the user
is in a project context.
::
$ cabal new-repl --ignore-project --build-depends "vector >= 0.12 && < 0.13"
$ cabal new-repl --project='' --build-depends "vector >= 0.12 && < 0.13"
This command would add ``vector``, but not (for example) ``primitive``, because
it only includes the packages specified on the command line (and ``base``, which
cannot be excluded for technical reasons).
::
$ cabal new-repl --build-depends vector --no-transitive-deps
cabal new-run
-------------
......
-*-change-log-*-
2.4.0.0 (current development version)
* 'new-repl' now accepts a '--build-depends' flag which accepts the
same syntax as is used in .cabal files to add additional dependencies
to the environment when developing in the REPL. It is now usable outside
of projects. (#5425, #5454)
* 'new-build' now treats Haddock errors non-fatally. In addition,
it attempts to avoid trying to generate Haddocks when there is
nothing to generate them from. (#5232, #5459)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment