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, had an example added, its test suite updated, and had the following hint added. (See 28cc7d5.)
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. -
raindrops: Easy. -
diamond: Easy. -
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. -
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.
In #780, exercises that might be applicable for teaching the
Data.Textmodule were found. In some of those cases, the test suite was extended withOverloadedStringsso that bothStringandTextsolutions work, and an example solution was provided. For a notable example of this, one of the early exercises, Bob, had an example added, its test suite updated, and had the following hint added. (See 28cc7d5.)This issue contains the remaining exercises for which
Data.Textmay 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) makeData.Textthe default in the stub file.List of exercises that don't yet support
Data.Textbut could:rotational-cipher: Easy.raindrops: Easy.diamond: Easy.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.series: Easy. Test suite already containsOverloadedStringsand already hasByteString -> Seq (Seq a). So aData.Textexample is probably not necessary unless the stub should encourage something other thanStringby 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.Textby 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.