Clock: Add deriving Eq
to stub to make it testable
#891
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clock is the last remaining exercise that has the .meta/DONT-TEST-STUB file because the type in the src/Clock.hs stub is not compatible with the test suite.
Other examples of exercises that were revised so that testing the stub became possible are listed in #466. The difference is that those all had
data
definitions, whereas Clock is ideally solved with a 'newtype' and an appropriate alias.The DONT-TEST-STUB mechanism was added by @petertseng in #464 and in particular the commits
The change made in this commit argues that since the example solution has
deriving Eq
, adding this to the stub will make the exercise a bit easier, but it still won't give away the central piece.The motivation behind removing DONT-TEST-STUB in Clock is that with this single effort, we can say that all stubs can be compiled and tested. To motivate further, I will cite @rbasso in #466:
This bumps the exercise's version from 2.4.0.9 to 2.4.0.10.