Skip to content

Commit 534192c

Browse files
committed
Fix render
1 parent 18f22c8 commit 534192c

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

doc/install_and_upgrade.md

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
The goal of setting up is a `stack` executable file on the PATH. When Stack is
66
used, it sets other things up as needed.
77

8-
*[PATH]: An environment variable that specifies a list of directories searched
9-
for executable files.
8+
*[PATH]: An environment variable that specifies a list of directories searched for executable files.
109

1110
??? question "How do I know if Stack is on the PATH?"
1211

@@ -162,7 +161,7 @@ Stack can be installed directly or by using the GHCup tool.
162161
to install to `/usr/local/bin`. If you prefer more control, follow
163162
the manual installation instructions for your platform below.
164163

165-
??? Can I download Stack manually?
164+
??? question "Can I download Stack manually?"
166165

167166
Yes. Manual download for Linux distributions depends on your machine
168167
architecture, x86_64 or AArch64/ARM64.
@@ -271,7 +270,7 @@ Stack can be installed directly or by using the GHCup tool.
271270
sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg netbase
272271
~~~
273272

274-
??? Can I use a Linux package to get Stack?
273+
??? question "Can I use a Linux package to get Stack?"
275274

276275
Some Linux distributions have official or unofficial packages for
277276
Stack, including Arch Linux, Debian, Fedora, NixOS, openSUSE/SUSE
@@ -382,8 +381,9 @@ Stack can be installed directly or by using the GHCup tool.
382381
[packages](http://packages.ubuntu.com/search?keywords=haskell-stack&searchon=names&suite=all&section=all)
383382
for Ubuntu 20.04 and up.
384383

385-
It is possible to set up auto-completion of Stack commands. For
386-
further information, see the
384+
??? question "Can I set up auto-completion of Stack commands?"
385+
386+
Yes. For further information, see the
387387
[shell auto-completion](topics/shell_autocompletion.md)
388388
documentation.
389389

@@ -471,7 +471,7 @@ Stack can be installed directly or by using the GHCup tool.
471471
dependencies and to install to `/usr/local/bin`. If you prefer
472472
more control, follow the manual installation instructions below.
473473

474-
??? Can I download Stack manually?
474+
??? question "Can I download Stack manually?"
475475

476476
Yes:
477477

@@ -513,39 +513,42 @@ Stack can be installed directly or by using the GHCup tool.
513513
dependencies and to install to `/usr/local/bin`. If you prefer
514514
more control, follow the manual installation instructions below.
515515

516-
The installation of Stack or some packages (e.g. `network`)
517-
requiring C source compilation might fail with:
516+
??? question "What if I get error `C compiler cannot build executables`?"
518517

519-
~~~text
520-
configure: error: C compiler cannot build executables
521-
~~~
518+
The installation of Stack or some packages (e.g. `network`)
519+
requiring C source compilation might fail with:
520+
521+
~~~text
522+
configure: error: C compiler cannot build executables
523+
~~~
522524

523-
In that case you should pass `-arch arm64` as part of the `CFLAGS`
524-
environment variable. This setting will be picked up by the C
525-
compiler of your choice.
525+
In that case you should pass `-arch arm64` as part of the
526+
`CFLAGS` environment variable. This setting will be picked up by
527+
the C compiler of your choice.
526528

527-
~~~bash
528-
# Assuming BASH below
529+
~~~bash
530+
# Assuming BASH below
529531

530-
# passing CFLAGS in-line with the command giving rise to the error
531-
CFLAGS="-arch arm64 ${CFLAGS:-}" some_command_to_install_stack
532-
CFLAGS="-arch arm64 ${CFLAGS:-}" stack [build|install]
532+
# passing CFLAGS in-line with the command giving rise to the error
533+
CFLAGS="-arch arm64 ${CFLAGS:-}" some_command_to_install_stack
534+
CFLAGS="-arch arm64 ${CFLAGS:-}" stack [build|install]
533535

534-
# -- OR --
536+
# -- OR --
535537

536-
# ~/.bash_profile
537-
# NOTE: only do this if you do not have to cross-compile, or remember to unset
538-
# CFLAGS when needed
539-
export CFLAGS="-arch arm64 ${CFLAGS:-}"
540-
~~~
538+
# ~/.bash_profile
539+
# NOTE: only do this if you do not have to cross-compile, or remember to unset
540+
# CFLAGS when needed
541+
export CFLAGS="-arch arm64 ${CFLAGS:-}"
542+
~~~
541543

542-
The setting instructs the C compiler to compile objects for ARM64.
543-
These can then be linked with libraries built for ARM64. Without the
544-
instruction, the C compiler, invoked by Cabal running in x86-64,
545-
would compile x86-64 objects and attempt to link them with existing
546-
ARM64 libraries, resulting in the error above.
544+
The setting instructs the C compiler to compile objects for
545+
ARM64. These can then be linked with libraries built for ARM64.
546+
Without the instruction, the C compiler, invoked by Cabal
547+
running in x86-64, would compile x86-64 objects and attempt to
548+
link them with existing ARM64 libraries, resulting in the error
549+
above.
547550

548-
??? Can I download Stack manually?
551+
??? question "Can I download Stack manually?"
549552

550553
Yes:
551554

@@ -576,7 +579,7 @@ Stack can be installed directly or by using the GHCup tool.
576579
|8.6.5 |6 |
577580
|8.4.4 |5 |
578581

579-
??? Can I use the Homebrew package manager to get Stack?
582+
??? question "Can I use the Homebrew package manager to get Stack?"
580583

581584
[Homebrew](https://brew.sh/) is a popular package manager for macOS.
582585
If you have its `brew` tool installed, you can just command:
@@ -594,11 +597,11 @@ Stack can be installed directly or by using the GHCup tool.
594597
source (which will take hours), see
595598
[their FAQ on the topic](https://github.com/Homebrew/brew/blob/master/docs/FAQ.md#why-do-you-compile-everything).
596599

597-
### Auto-completion of Stack commands
600+
??? question "Can I set up auto-completion of Stack commands?"
598601

599-
It is possible to set up auto-completion of Stack commands. For further
600-
information, see the
601-
[shell auto-completion](topics/shell_autocompletion.md) documentation.
602+
Yes. For further information, see the
603+
[shell auto-completion](topics/shell_autocompletion.md)
604+
documentation.
602605

603606
=== "Windows"
604607

0 commit comments

Comments
 (0)