Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
Cabal
Commits
0f1e17df
Commit
0f1e17df
authored
11 months ago
by
Zoe Zuser
Committed by
Mikolaj
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add docs for list-bin support of scripts
closes #7986
parent
2658ac6c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/cabal-commands.rst
+13
-2
13 additions, 2 deletions
doc/cabal-commands.rst
with
13 additions
and
2 deletions
doc/cabal-commands.rst
+
13
−
2
View file @
0f1e17df
...
...
@@ -245,8 +245,8 @@ A cabal command target can take any of the following forms:
component of which the given filepath is a part of will be built.
- A script target: ``path/to/script``, which specifies the path to a script
file. This is supported by ``build``, ``repl``, ``run``,
and ``clean``.
Script targets are not part of a package.
file. This is supported by ``build``, ``repl``, ``run``,
``list-bin``, and
``clean``.
Script targets are not part of a package.
.. _command-group-global:
...
...
@@ -970,6 +970,14 @@ We can also scope to test suite targets as they produce binaries.
$ cabal list-bin cabal-install:unit-tests
/.../dist-newstyle/.../unit-tests/unit-tests
It can also be used to display the location of the cached executable for a
cabal script.
::
$ cabal list-bin path/to/script
$XDG_CACHE_HOME/cabal/script-builds/.../bin/script
Note that ``cabal list-bin`` will print the executables' location, but
will not make sure that these executables actually exist (i.e., have
been successfully built). In order to determine the correct location,
...
...
@@ -1140,6 +1148,9 @@ The executable is cached under the cabal directory, and can be pre-built with
``cabal build path/to/script`` and the cache can be removed with
``cabal clean path/to/script``.
The location of the cached executable can be displayed with
``cabal list-bin path/to/script``.
A note on targets: Whenever a command takes a script target and it matches the
name of another target, the other target is preferred. To load the script
instead pass it as an explicit path: ./script
...
...
This diff is collapsed.
Click to expand it.
Mikolaj Konarski
@Mikolaj
mentioned in commit
a0a820f9
·
10 months ago
mentioned in commit
a0a820f9
mentioned in commit a0a820f9738ef72bc273f3f315539290d76fdf1b
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment