Skip to content

Commit f65f903

Browse files
authored
Merge pull request #1112 from pwadsworth/main
reference/concepts.md: Update concepts completed README: Add instructions.md and config.json to practice exercise structure
2 parents d983c1e + 825e382 commit f65f903

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
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

reference/concepts.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ The Haskell concept exercises are based on concepts. The list below contains the
2727
- [ ] Tail recursion
2828
- [ ] Type declarations & annotations
2929
- [ ] Immutability
30-
- [ ] Pattern matching
31-
- [ ] Wildcards
32-
- [ ] Guard clauses
30+
- [x] Pattern matching
31+
- [x] Wildcards
32+
- [x] Guard clauses
3333
- [ ] Type inference
3434
- [ ] Polymorphism by default
3535

@@ -67,18 +67,18 @@ The Haskell concept exercises are based on concepts. The list below contains the
6767
- [ ] Resource allocation
6868
- [ ] Scoping
6969
- [ ] Imports
70-
- [ ] Modules
70+
- [x] Modules
7171
- [ ] Namespaces
7272
- [ ] Shadowing
73-
- [ ] Visibility (export or not)
74-
- [ ] Whitespace significant
73+
- [x] Visibility (export or not)
74+
- [x] Whitespace significant
7575
- [ ] String formatting
76-
- [ ] Values
77-
- [ ] Definitions
76+
- [x] Values
77+
- [x] Definitions
7878

7979
### Types
8080

81-
- [ ] Booleans
81+
- [x] Booleans
8282
- [ ] Characters
8383
- [ ] Collections
8484
- [ ] Arrays

0 commit comments

Comments
 (0)