Closed tofische closed 8 months ago
Hello. Thanks for opening a PR on Exercism 🙂
We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.
You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.
If you're interested in learning more about this auto-responder, please read this blog post.
Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.
I don't think reduce
should be exported. Going by the instructions there shouldn't be a need for that either:
Your implementation of rational numbers should always be reduced to lowest terms.
I understand this to mean that it should be impossible for a user of this module to construct unreduced fractions.
To still be able to test proper reduction, we could require export of projections numerator
and denominator
.
@MatthijsBlom Ping me when you've approved!
We now have rational :: (a, a) -> Rational a
, but this allows creating fractions with 0 as denominator. Seemingly, having rational :: (a, a) -> Maybe (Rational a)
would be more idiomatic. However, then div
would still allow us to commit division by zero, so I think we might as well keep the present rational :: (a, a) -> Rational a
.
I don't think
reduce
should be exported. Going by the instructions there shouldn't be a need for that either:Your implementation of rational numbers should always be reduced to lowest terms.
I understand this to mean that it should be impossible for a user of this module to construct unreduced fractions.
To still be able to test proper reduction, we could require export of projections
numerator
anddenominator
.
You are correct, I'll update the exercise.
@MatthijsBlom could you review again?
I'm now a little bit confused - shall I do something in order to enable this PR to be merged?
Sorry, I haven't been able to find the energy to review properly again.
Sorry, I haven't been able to find the energy to review properly again.
No problem, I was just unsure because one check (although not required) failed.
@MatthijsBlom if you haven't found the time in the next couple of days, I'll look into it
Added a new Haskell practice exercise Rational Numbers based on the available problem specification.