purescript
purescript copied to clipboard
Exercism exercises in PureScript.
Exercism PureScript Track
Exercism exercises in PureScript.
How to contribute
Thank you so much for contributing! :tada:
- Asking for help
-
How to contribute
- Reporting or fixing bugs
- Reviewing issues and pull requests
- Porting exercises
- Repository structure and conventions
- Writing a pull request
Asking for help
When in doubt just open a GitHub issue and ask! In any case, don't be afraid or shy! We promise to be friendly and as helpful as possible.
How to contribute
As a first step we recommend you read the contributing guide.
Standard exercise folder strucutre
All exercises live in exercises
folder. Here's the standard folder structure:
<exercise name>
├─ examples
│ └─ src
│ └─ <ExerciseName>.purs
├─ src
│ └─ <ExerciseName>.purs
├─ test
│ └─ Main.purs
├─ packages.dhall
└─ spago.dhall
Creating a new exercise requires modification to:
-
examples/src/<ExerciseName>.purs
- put your solution here -
src/<ExerciseName>.purs
- this should generally only have the module declaration and the exports and signatures of the functions that the solution should contain
The remaining files:
-
test/Main.purs
- contains tests -
spago.dhall
andpackages.dhall
- these are copied from the template projecttemplate/*.dhall
and should not be directly modified (see the following section)
Steps for adding a new exercise
- Create a new git branch for the exercise
- Create a directory for the exercise in
exercises
folder with the name of the exercise - Create directories
examples
,src
andtest
in your exercise directory - Use
bin/fetch-configlet && bin/configlet generate . --only exercise-name
to generate theREADME.md
- Use
bin/configlet uuid
to generate a new UUID for the exercise - Add exercise details to
config.json
- Add tests to
test/Main.purs
- Add your solution to
examples/src/<ExerciseName>.purs
- Run
bin/test.sh
to make sure all tests pass - Commit, push and make a pull request
- Check that GitHub CI passes
Reporting or fixing bugs
Typical examples for a bug: A typo, a missing test case, an unclear or ambiguous problem description.
- If you are unsure whether you have really found a bug just ask.
- To report a bug you can write an issue
- If you already have a fix for it you may write a pull request.
Reviewing issues and pull requests
If you have an opinion or feedback on work currently being done on this track please do write a comment for an issue or a pull request. Feedback is extremely useful to us.
Please be detailed and include any links or arguments to support your opinion.
Porting exercises
Here is the list of missing exercises. See here for more information about porting an exercise. Of course you can also add a totally new exercise, but it might be a good idea to first discuss it in one of our forums.
Repository structure and conventions
Here is a general description of all the files and directories that are not explicitly described below.
Writing a pull request
To fix a bug you should create a pull request from a fork here. See also here for more information.
Purescript icon
The PureScript logo was created by Gareth Hughes, and is licensed under the Creative Commons Attribution 4.0 license. We have adapted it, changing the colour scheme, for use on Exercism.