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
Glasgow Haskell Compiler
Packages
Cabal
Commits
2ea012eb
Unverified
Commit
2ea012eb
authored
1 year ago
by
Phil de Joux
Browse files
Options
Downloads
Patches
Plain Diff
Fix whitespace in docs
parent
c31ca12e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CONTRIBUTING.md
+2
-2
2 additions, 2 deletions
CONTRIBUTING.md
README.md
+2
-2
2 additions, 2 deletions
README.md
doc/cabal-commands.rst
+4
-4
4 additions, 4 deletions
doc/cabal-commands.rst
doc/getting-started.rst
+10
-10
10 additions, 10 deletions
doc/getting-started.rst
with
18 additions
and
18 deletions
CONTRIBUTING.md
+
2
−
2
View file @
2ea012eb
...
...
@@ -142,7 +142,7 @@ and should be written in the body of the ticket or PR under their own heading, l
For instance:
> \#\# QA Notes
>
>
> Calling `cabal haddock-project` should produce documentation for the whole cabal project with the following defaults enabled:
> * Documentation lives in ./haddocks
> * The file `./haddocks/index.html` should exist
...
...
@@ -408,7 +408,7 @@ Running workflow manually as discussed above requires you to supply two inputs:
Going via an example, imagine that Cabal only allows
`tar`
or version less then
or equal to 0.6, and you want to bump it to 0.6. Then, to show that Validate
succeeds with
`tar`
0.6, you should input
succeeds with
`tar`
0.6, you should input
-
`tar`
to the "allow-newer line"
-
`tar ==0.6`
to the "constraints line"
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
2
View file @
2ea012eb
...
...
@@ -43,7 +43,7 @@ Currently, we only provide binaries for `x86_64` platforms.
```
Replace "Linux" with "Windows" or "macOS" as appropriate.
The default Linux build is dynamically linked against `zlib`, `gmp` and `glibc`.
You will need to have appropriate versions of these libraries installed to use it.
Alternatively a statically linked "Linux-static" binary is also provided.
...
...
@@ -51,7 +51,7 @@ Currently, we only provide binaries for `x86_64` platforms.
You might need to add the following to your `cabal.project` file
if your build fails because of an out-of-date `Cabal` library:
```
allow-newer:
allow-newer:
*:Cabal,
*:Cabal-syntax
...
...
This diff is collapsed.
Click to expand it.
doc/cabal-commands.rst
+
4
−
4
View file @
2ea012eb
...
...
@@ -1381,8 +1381,8 @@ to Hackage.
.. option:: -t TOKEN or -tTOKEN, --token=TOKEN
Your Hackage authentication token. You can create and delete
authentication tokens on Hackage's `account management page
Your Hackage authentication token. You can create and delete
authentication tokens on Hackage's `account management page
<https://hackage.haskell.org/users/account-management>`__.
.. option:: -u USERNAME or -uUSERNAME, --username=USERNAME
...
...
@@ -1416,8 +1416,8 @@ cabal report
.. option:: -t TOKEN or -tTOKEN, --token=TOKEN
Your Hackage authentication token. You can create and delete
authentication tokens on Hackage's `account management page
Your Hackage authentication token. You can create and delete
authentication tokens on Hackage's `account management page
<https://hackage.haskell.org/users/account-management>`__.
.. option:: -u USERNAME or -uUSERNAME, --username=USERNAME
...
...
This diff is collapsed.
Click to expand it.
doc/getting-started.rst
+
10
−
10
View file @
2ea012eb
...
...
@@ -4,16 +4,16 @@ Getting Started
Installing Cabal
----------------
The easiest and recommended way to install the ``cabal`` command-line tool
on Linux, macOS, FreeBSD or Windows is through `ghcup <https://www.haskell.org/ghcup/>`__.
The easiest and recommended way to install the ``cabal`` command-line tool
on Linux, macOS, FreeBSD or Windows is through `ghcup <https://www.haskell.org/ghcup/>`__.
It installs the “Haskell toolchain”, which includes Cabal,
the Haskell compiler `GHC <https://www.haskell.org/ghc/>`__
the Haskell compiler `GHC <https://www.haskell.org/ghc/>`__
and optionally other useful Haskell tools.
Creating a new application
--------------------------
We create a minimal Haskell application to get a quick overview
We create a minimal Haskell application to get a quick overview
of the ``cabal`` command-line tool:
1. How to initialize a Haskell package.
...
...
@@ -59,9 +59,9 @@ The ``myapp.cabal`` file is a package description file, commonly referred to as
default-language: Haskell2010
It contains metadata (package name and version, author name, license, etc.) and sections
to define package components. Components can be used to split large codebases into smaller,
to define package components. Components can be used to split large codebases into smaller,
more managable building blocks.
A component can be of one of several types (executable, library, etc.) and describes,
A component can be of one of several types (executable, library, etc.) and describes,
among other things, the location of source files and its dependencies.
The ``myapp.cabal`` file above defines a single component named ``myapp`` of the executable type.
Inside the ``executable`` section, the ``build-depends`` field lists the dependencies of this component.
...
...
@@ -77,7 +77,7 @@ The ``app/Main.hs`` file is where your executable's code lives:
main = putStrLn "Hello, Haskell!"
To run the executable, switch into the application directory with ``cd myapp`` and run
To run the executable, switch into the application directory with ``cd myapp`` and run
.. code-block:: console
...
...
@@ -86,7 +86,7 @@ To run the executable, switch into the application directory with ``cd myapp`` a
Hello, Haskell!
This command automatically determines if the executable needs to be (re)built
before running the executable. With only one executable component in the package,
before running the executable. With only one executable component in the package,
``cabal run`` (without a component name) is smart enough to infer it, so the name can be omitted.
If you just want to build the executable without running it, run:
...
...
@@ -181,11 +181,11 @@ Now you can build and re-run your code to see the new output:
Running a single-file Haskell script
------------------------------------
Cabal also supports running single-file Haskell scripts like
Cabal also supports running single-file Haskell scripts like
the following file named ``myscript``:
.. code-block:: haskell
#!/usr/bin/env cabal
{- cabal:
build-depends:
...
...
This diff is collapsed.
Click to expand it.
Ben Gamari
@bgamari
mentioned in commit
ea05e10e
·
10 months ago
mentioned in commit
ea05e10e
mentioned in commit ea05e10e55077344e10596f4da6d2c30c534dfc6
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