exercism / exercism/haskell

Port test suite so it supports Data.Text

Đang mở
#841 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
good first issue
Ngôn ngữ chính
Haskell
Star
529
Fork
201
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.