Running "cabal check" no longer complains of anything. Running "cabal haddock" reports 100% coverage.
- Converted the various index to square and algebraic squares to use Maybe types and handle errors sensibly. - Added tests for a few missing items and cleaned up some of the existing tests a bit. - Ran HPC reports on the whole thing and, aside from a few unused Show instances and one thunk in some (intentionally) bad data, everything is executed by the test suite.
Unsurprisingly, this almost immediately caught a couple of semi-problems. Forcing code to be clear about what table an index is intended for will help development and debugging.
All the underscore usage was clashing with camel case elsewhere. So I've switched to using "prop_<camel case>". I'm aware of the apparent illogic in switching to a mixture of underscore and camel case, but I also want property checks to stand out easily and "prop_" does that.
Moved the tests to the ChessTools/Test/ directory after thinking about how the test suite is likely to develop. This should help avoid the need for clunky naming to avoid module name clashes when importing (it won't make the full import name any shorter, but it will be more descriptive and obviously hierarchicaly). Thus, TestBoard -> ChessTools.Test.Board, and Suite -> ChessTools.Test.Suite. Necessary modifications made to the source so that the tests are still all passing.
This was a hangover from C-like data structures and requirements for positive index values. Might as well use Haskell's support for arbitrary array bounds directly; it simplifies the API in quite a few places.