diff --git a/README.md b/README.md index 5cca12bf5..b4935f5be 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,11 @@ Please see the [contributing guide](https://github.com/exercism/x-api/blob/maste ### Development Dependencies You should have [Stack](http://docs.haskellstack.org/) installed in your -system to make contributing to this repository easier. Also, until we finish -migration of all exercises to stack projects -[#185](https://github.com/exercism/xhaskell/issues/185), you'll need some -additional packages installed in your *implicit global project*: - -```bash -stack setup -stack install attoparsec HUnit lens old-locale parallel QuickCheck random split stm text vector -``` +system to make contributing to this repository easier. ### Exercises -Currently, we have two types of exercises in this track: - -###### Stack projects - -We are migrating all the exercises to this new format: +All exercises have the following structure: - `stack.yaml` has just one line specifying the current [Stack snapshot](https://www.stackage.org/snapshots). We use the same @@ -36,20 +24,10 @@ resolver for all the exercises. format that has all dependencies and build instructions for an exercise. - `src/Example.hs` is a sample solution passing the tests. - `src/ModuleName.hs` is a *stub solution*. -- `test/Test.hs` is the test suite. - -###### Legacy exercises - -Legacy exercises have two or three files and no directories: - -- `exercise-name_test.hs` is the tests suite. -- `example.hs` is a sample solution passing the tests. -- `ModuleName.hs` is an optional *stub solution*. +- `test/Tests.hs` is the test suite. ### Running Tests -###### Exercises that are stack projects - Rename the file `src/Example.hs` to match the module name and run: ```bash @@ -58,14 +36,6 @@ stack test --pedantic If the stub solution is still in the `/src` folder, build will probably fail. -###### Legacy exercises - -Rename the file `example.hs` to match the module name and run: - -```bash -stack runghc exercise-name_test.hs -``` - ## License The MIT License (MIT) diff --git a/SETUP.md b/SETUP.md index b4f36eb5e..e476af8de 100644 --- a/SETUP.md +++ b/SETUP.md @@ -8,12 +8,6 @@ For installation and learning resources, refer to the To run the test suite, execute the following command: -```bash -stack runghc exercise-name_test.hs -``` - -Or, for the latter, exercises: - ```bash stack test ``` diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index cce3ff8d0..9e36efb83 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -11,16 +11,6 @@ stack --version If it outputs Stack's version, then you have it installed correctly. -## Installing dependencies - -You'll also need to install some additional packages in your *implicit -global project*: - -```bash -stack setup -stack install attoparsec HUnit lens old-locale parallel QuickCheck random split stm text vector -``` - ## Installing HLint (optional) HLint is a tool for suggesting possible improvements to Haskell code. These diff --git a/docs/TESTS.md b/docs/TESTS.md index 7d41a2423..f080dea8d 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -1,31 +1,8 @@ ## Running Tests -###### If the exercise's folder looks like this... - -``` -./README.md -./exercise-name_test.hs -``` - Execute the following command to run the tests: -```bash -stack runghc exercise-name_test.hs -``` - -###### Otherwise, it will be like this... - -``` -./README.md -./stack.yaml -./package.yaml -./src/ModuleName.hs -./test/Test.hs -``` - -In which case you should type: - ```bash stack test ``` @@ -66,23 +43,10 @@ Just keep in mind that this *stub*, if available, is there just for you to get started. Feel free to change it completely if you think it is the right thing to do. -#### Using additional packages - -If you want to use additional packages to write a more elegant solution, -you'll need to install the packages or list them in `package.yaml`, depending -on the type of exercise you are solving. - -###### Exercises without a *package.yaml* file - -This will install packages `foo` and `bar` to your *implicit global project*: - -```bash -stack install foo bar -``` - -###### Exercises with a *package.yaml* file +#### Using packages -Just add the packages to your solution's dependencies in `package.yaml`: +If you want to use some packages to write a more elegant solution, just +add the packages to your solution's dependencies in `package.yaml`: ```yaml library: