diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index abfddd7715d..5ca5544106b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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" diff --git a/README.md b/README.md index 008a6be0b22..bf6ea795060 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/doc/cabal-commands.rst b/doc/cabal-commands.rst index 229a5b7a616..3508d64e817 100644 --- a/doc/cabal-commands.rst +++ b/doc/cabal-commands.rst @@ -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 `__. .. 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 `__. .. option:: -u USERNAME or -uUSERNAME, --username=USERNAME diff --git a/doc/getting-started.rst b/doc/getting-started.rst index 39a095a7453..b04140a2189 100644 --- a/doc/getting-started.rst +++ b/doc/getting-started.rst @@ -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 `__. +The easiest and recommended way to install the ``cabal`` command-line tool +on Linux, macOS, FreeBSD or Windows is through `ghcup `__. It installs the “Haskell toolchain”, which includes Cabal, -the Haskell compiler `GHC `__ +the Haskell compiler `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: