-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port test suite so it supports Data.Text #841
Comments
I can add |
@barrymoo: That sounds good! Since you're adding property-based tests for Diamond in #843 right now, I would recommend that you either (1) wait with adding I would recommend (1) because it involves fewer merge conflicts. |
Addresses #841. Because the Diamond exercise uses property-based tests, it is not enough to assume that an instance of `IsString s` also has `Eq s`, since the properties use several string-related functions. And because `String` is polymorphic and `Text` is monomorphic, there is no common interface to these functions. This os overcome with the 'string-conversions' package.
I will work on |
Could you consider TIA |
Yes
…On Mon, 29 Nov 2021 at 07.16, Cyber Oliveira ***@***.***> wrote:
Could you consider wordy as well?
TIA
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#841 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMNPZHPY7KAQ5N4Y3QXZDUOMLE7ANCNFSM4ITRWYSA>
.
|
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 withOverloadedStrings
so that bothString
andText
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) makeData.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 containsOverloadedStrings
and already hasByteString -> Seq (Seq a)
. So aData.Text
example is probably not necessary unless the stub should encourage something other thanString
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.The text was updated successfully, but these errors were encountered: