-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Shouldn't all exercises have ghc-options: -Wall
in their package.yaml?
#769
Comments
Yes, not only is this a good idea on its own merits, the history supports it as well because exercism/exercism#804 added |
I've removed
After the amend:
As 96 + 105 = 201, it seems that no other files were affected. (Actually, I did accidentally commit a rogue file and found it by doing this test. Hooray!) |
* binary-search: Add exercise (closes #615) Finishing @samosaara's work, this implements the binary-search exercise on the Haskell track using `Data.Array` from the `array` package. This seems to be the preferred choice cf. the discussion at #615. In addition, a number of changes were made: - Unlock this after `collatz-conjecture` as the exercise deals with `Maybe`; placing it after the first exercise that deals with error handling seems natural. - Set exercise version number to 1.3.0.0 and update test suite. This addresses exercism/problem-specifications#1399 (version 1.3.0). - Add `ghc-options: -Wall` since #769. - Export function as `find`. This is what problem-specification calls it. - Generalise type signature in stub to better distinguish the type parameter for the index and the type parameter for the elements. One could generalise `Int` to `Ix i => i`, but this becomes slightly difficult when doing index arithmetic. - Make example solution work for arbitrary array bounds. Add test cases specific to the Haskell track that tests non-zero bounds. These cannot be expressed in problem-specifications right now, and they're only relevant for languages that can change the array base. - Add hint for optionally dealing with non-zero bounds. - Add hint with resources to `Data.Array`.
In
Space Age
I argue in my mentor feedback that one benefit of writing a total function,is that GHC can warn you in case of missing or duplicate cases, and that this is useful when extending data types over time. But if you add a planet and forget to extend
orbitalPeriod
,stack test
andstack build
will not, actually, show this warning.Which made me think, why don't we add
ghc-options: -Wall
to package.yaml of all exercises?The text was updated successfully, but these errors were encountered: