Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document available packages in TESTS.md #1182

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,24 @@ library:
- bar
```

Then, when submitting your solution, remember to submit `package.yaml` as
well (otherwise the solution will fail). From the project's top-level
directory run:

```bash
exercism submit package.yaml src/ModuleName.hs
While working locally, you can use any packages you like.
The online test runner, however, has access to only a limited set of packages.
The available packages are

- the ones that come pre-installed with GHC (most notably `base`, `containers`, `array`, `time`, `mtl`, `deepseq`, `exceptions`, `bytestring`), plus
- those pre-built for the test runner, listed at [haskell-test-runner/pre-compiled/package.yaml](https://github.com/exercism/haskell-test-runner/blob/main/pre-compiled/package.yaml).

If you submit a solution that uses a package that is not available, then the test runner will run into its lack of internet access and produce an error that looks like this:

```text
Cabal file info not found for unavailable-package-1.0@..., updating
Selected mirror https://hackage.haskell.org/
Downloading root
HttpExceptionRequest Request {
host = "hackage.haskell.org"
...
}
(ConnectionFailure ...)
```

### Running *GHCi*
Expand Down
Loading