Skip to content

Commit

Permalink
Document available packages in TESTS.md (#1182)
Browse files Browse the repository at this point in the history
* Remove outdated warning

* Document available packages
  • Loading branch information
MatthijsBlom authored Aug 1, 2023
1 parent e6087dd commit f53b705
Showing 1 changed file with 18 additions and 6 deletions.
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

0 comments on commit f53b705

Please sign in to comment.