<commit_before># `stack` Quick Start Guide

Start your new project:

~~~ {.bash}
stack new my-project
cd my-project
stack setup
stack build
stack exec my-project-exe
~~~

- The `stack new` command will create a new directory containing all
the needed files to start a project correctly.
- The `stack setup` will download the compiler if necessary.
- The `stack build` command will build the minimal project.
- `stack exec my-project-exe` will execute the command.

If you want to launch a REPL:

~~~ {.bash}
stack ghci
~~~

## Workflow

The `stack new` command should have created the following files:

~~~
.
├── LICENSE
├── Setup.hs
├── app
│   └── Main.hs
├── my-project.cabal
├── src
│   └── Lib.hs
├── stack.yaml
└── test
    └── Spec.hs

    3 directories, 7 files
~~~

So to manage your library:

1. Edit files in the `src/` directory.

The `app` directory should preferably contains only files related to
executables.

2. If you need to include another library (for example the package [`text`](https://hackage.haskell.org/package/text):

   - Add the package `text` to the file `my-project.cabal`
     in the section `build-depends: ...`.
   - run `stack build` another time

3. If you get an error that tells you your package isn't in the LTS.
   Just try to add a new version in the `stack.yaml` file in the `extra-deps` section.

It was a really fast introduction on how to start to code in Haskell using `stack`.
If you want to go further, we highly recommend you to read the [`stack` guide](https://github.com/commercialhaskell/stack/blob/master/doc/GUIDE.md).
<commit_msg>Added install stack link<commit_after># `stack` Quick Start Guide

If not already done you first need to
[install `stack`](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md).

## Start your new project:

~~~ {.bash}
stack new my-project
cd my-project
stack setup
stack build
stack exec my-project-exe
~~~

- The `stack new` command will create a new directory containing all
the needed files to start a project correctly.
- The `stack setup` will download the compiler if necessary.
- The `stack build` command will build the minimal project.
- `stack exec my-project-exe` will execute the command.

If you want to launch a REPL:

~~~ {.bash}
stack ghci
~~~

## Workflow

The `stack new` command should have created the following files:

~~~
.
├── LICENSE
├── Setup.hs
├── app
│   └── Main.hs
├── my-project.cabal
├── src
│   └── Lib.hs
├── stack.yaml
└── test
    └── Spec.hs

    3 directories, 7 files
~~~

So to manage your library:

1. Edit files in the `src/` directory.

The `app` directory should preferably contains only files related to
executables.

2. If you need to include another library (for example the package [`text`](https://hackage.haskell.org/package/text):

   - Add the package `text` to the file `my-project.cabal`
     in the section `build-depends: ...`.
   - run `stack build` another time

3. If you get an error that tells you your package isn't in the LTS.
   Just try to add a new version in the `stack.yaml` file in the `extra-deps` section.

It was a really fast introduction on how to start to code in Haskell using `stack`.
If you want to go further, we highly recommend you to read the [`stack` guide](https://github.com/commercialhaskell/stack/blob/master/doc/GUIDE.md).

{'fraction_non_alphanumeric': 0.11121130147279831, 'fraction_numerical': 0.003005710850616171, 'mean_word_length': 3.6415620641562065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5065174', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1023, 'n_words': 467}