Skip to content

Commit 825e382

Browse files
pwadsworthpetertseng
authored andcommitted
README: Add instructions.md and config.json to practice exercise structure
Closes #1085
1 parent 2e01022 commit 825e382

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Exercism exercises in Haskell
1414
* [Update an exercise test suite](#update-an-exercise-test-suite)
1515
- [Repository structure and conventions](#repository-structure-and-conventions)
1616
* [Directory structure](#directory-structure)
17-
* [Exercise structure](#exercise-structure)
17+
* [Practice exercise structure](#practice-exercise-structure)
1818
* [Exercise versioning](#exercise-versioning)
1919
- [Development Dependencies](#development-dependencies)
2020
- [Stub solution](#stub-solution)
@@ -128,32 +128,40 @@ The [track anatomy documentation](https://github.com/exercism/docs/blob/master/l
128128
│ │ └── Accumulate.hs
129129
│ ├── test
130130
│ │ └── Tests.hs
131+
│ ├── .docs
132+
│ │ └── instructions.md
131133
│ └── .meta
132134
│ ├── examples
133135
│ │ └── success-standard
134136
│ │ ├── package.yaml
135137
│ │ └── src
136138
│ │ └── Accumulate.hs
139+
│ ├── config.json
137140
│ └── hints.md
138141
├── allergies
139142
│ └── ...
140143
└── ...
141144
```
142145
- `config.json`: Every exercise has to be registered here. It has a unique name and a difficulty. The sequence order is also the default order in which the exercises are fetched.
143146

144-
## Exercise structure
145-
Each exercise has the following structure:
147+
## Practice exercise structure
148+
Each practice exercise has the following structure:
146149
- `stack.yaml` has just one line specifying the current
147150
[Stack snapshot](https://www.stackage.org/snapshots). We use the same
148151
resolver for all the exercises.
149152
- `package.yaml` is a file in the [hpack](https://github.com/sol/hpack#readme)
150153
format that has all dependencies and build instructions for an exercise.
151154
One of the properties tracked in `package.yaml` is the [version](#exercise-versioning) of the exercise.
152155
- `src/ModuleName.hs` is a [stub solution](#stub-solution).
156+
- `.docs/instructions.md` contains the instructions and requirements to complete the exercise.
157+
For an exercise from [problem-specifications](https://github.com/exercism/problem-specifications/), this file should exactly match the description.md from problem-specifications.
158+
The [Exercism-wide documentation for instructions.md](https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md#file-docsinstructionsmd) contains more information.
153159
- `.meta/examples/success-<name>/package.yaml` contains library dependencies for the [example solution](#example-solution). `<name>` is a unique name for the example - usually "standard" (as in `success-standard`), but it can be some other name in case of multiple example solutions.
154160
- `.meta/examples/success-<name>/src/ModuleName.hs` is the source code of the sample solution.
155161
- `test/Tests.hs` is the [test suite](#test-suite).
156162
- `.meta/hints.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [problem-specifications](https://github.com/exercism/problem-specifications) to build the `README.md` file.
163+
- `.meta/config.json` is the exercise configuration file.
164+
The [Exercism-wide documentation for .meta/config.json](https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md#file-metaconfigjson) contains more information.
157165

158166
## Exercise versioning
159167

0 commit comments

Comments
 (0)