exercism / exercism/haskell

Port test suite so it supports Data.Text

Ouverte
#841 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
good first issue
Langage dominant
Haskell
Étoiles
529
Forks
201
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.