exercism / exercism/haskell

Port test suite so it supports Data.Text

Open
#841 5 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Haskell
Stars
529
Forks
201
PR merge metrics
No merged PRs in 30d

Description

In #780, exercises that might be applicable for teaching the `Data.Text` module were found. In some of those cases, the test suite was extended with `OverloadedStrings` so that both `String` and `Text` solutions work, and an example solution was provided. For a notable example of this, one of the early exercises, [Bob](https://github.com/exercism/haskell/tree/master/exercises/bob), had [an example](https://github.com/exercism/haskell/tree/master/exercises/bob/examples/success-text) added, its [test suite](https://github.com/exercism/haskell/blob/master/exercises/bob/test/Tests.hs) updated, and had [the following hint](https://github.com/exercism/haskell/blob/master/exercises/bob/.meta/hints.md) added. (See 28cc7d5fb44ff858938d435f9b42339f63742e44.)

This issue contains the remaining exercises for which `Data.Text` may be applicable. Contributors are free to pick an exercise they're comfortable with, **(1)** make an example solution, **(2)** make the test suite compatible with multiple string types, **(3)** add a hint, and **optionally (4)** make `Data.Text` the default in the stub file.

List of exercises that don't yet support `Data.Text` but could:
- [ ] `rotational-cipher`: Easy.
- [x] `raindrops`: Easy.
- [x] `diamond`: Easy.
- [x] `twelve-days`: Easy.
- [ ] `atbash-cipher`: Easy.
- [ ] `run-length-encoding`: Doable.
- [ ] `ocr-numbers`: Doable.
- [ ] `rail-fence-cipher`: Doable.
- [ ] `luhn`: Easy, but hardly relevant as the exercise mainly consists of working on integers.
- [x] `series`: Easy. Test suite already contains `OverloadedStrings` and already has `ByteString -> Seq (Seq a)`. So a `Data.Text` example is probably not necessary unless the stub should encourage something other than `String` by default.

I've looked at the example solution(s) for each of these and made a quick estimate where "Easy" means that it would be quick to translate this to `Data.Text` by finding equivalent combinators, and "Doable" means that the contributor probably needs to learn (part of) the algorithm in the exercise to port it. The estimation was made very quickly and subjectively, so your mileage may vary.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.