Skip to content

exercism/elm

Repository files navigation

Exercism Elm Track

elm / pr configlet

This is the Elm track, one of the many tracks on Exercism. It holds all the Elm Concepts, Concept Exercises and Practice Exercises that are currently implemented and available for students to complete. They are all listed in the config.json track config file. This readme file is mainly targeted at people wishing to contribute, but feel free to take a look around if you're interested in how Exercism language tracks are set up.

Track Organization

The track is organized with the following main directories and files:

bin/               # executables required to manage the track
config/            # configuration files for the track
docs/              # documentation files for automatically generated web pages on exercism.io
.github/workflows/ # CI config for automatic build and tests
exercises/         # contains one directory per exercise
template/          # template used when generating a new exercise
config.json        # main track configuration file for all exercises metadata
package.json       # Node package configuration required for running builds and tests

Each exercise within the exercises/ directory has the following structure:

elm.json               # elm json config file for the exercise
src/
  <PascalCaseSlug>.elm # exercise template, where <PascalCaseSlug> is the name of the exercise using PascalCase.
tests/
  Tests.elm            # tests for exercise, imports function(s) from src/<PascalCaseSlug>.elm
.meta/
  Exemplar.elm         # exemplary / example solution for this exercise
  config.json          # name of exercise, prerequisite concepts, concepts taught and similar
  design.md            # describe the learning goals of the exercise
.docs/
   introduction.md     # introduce the concept(s) that the exercise teaches to the student
   instructions.md     # describe the tasks to complete the exercise
   hints.md            # provide hints to a student to help them get themselves unstuck in an exercise

Contributing

We welcome contributions of all sorts and sizes, from reporting issues to submitting patches or implementing missing exercises. At the moment we would particularly like some help implementing new concept exercises, and beta testing.

If you would like to help, the best thing at the moment is probably to create an issue in this repository, and then one of us will get in touch with you and discuss what to do.

If you are not familiar with git and GitHub, you can also have a look at GitHub's getting started documentation.

Setup

In order to contribute code to this track, you will probably want npm, elm, elm-test, and elm-format installed globally. The build and test script for this track lives at bin/build.sh, and uses npx, so can work without the rest of the tools being installed if required.

Adding Missing Concept Exercise

TODO: link to the step-by-step guide instead here.

Version 3 of Exercism introduced Concepts and Concept Exercises, which are a completely new thing. There is a dependency diagram showing all the Elm concepts. You can see all concepts currently defined in concepts/, and you can se all concept exercises defined in /exercises/concept.

We would love some help creating more of these concepts / concept exercises. To do so, it is probably easiest to copy and paste an existing Concept and Concept Exercise. You will also need to add the meta data for these in config.json, and again, the easiest way is to copy and edit an existing entry. The Concept and Concept Exercise documentation have further details.

Elm Packages

We have decided not to make any of the *.Extra packages available. They change quite regularly so would add maintenance work. Where one of these packages would make an exercise easier, we point this out in the instructions, so that students can copy and paste the code from the package, or can write it themselves if they want.

Elm icon

We were unable to find copyright information about the Elm logo. It is a tangram in the square configuration, and when you hover over the "Playground" on the official webpage, it changes in to a figure (a solution of the tangram game). The origins of tangram are in the distant past and not well known, so we assume that there is no copyright infringement by using it.