* Refactor/rewrite all the code
The change prepares solid ground for further improvements. This also fixes
at least two bugs:
* Proper support for empty lines and comments in build scripts.
* Previously switching to new releases was not atomic despite messing with
symlinks. This is because it deleted the current link before creating the
new one, but it should have created a new link and then use ‘mv’ to
replace the old one atomically. The code has been changed to work properly
now.
* Refresh the test suite as well
* Fix the build for older GHCs
* Use subshell for ‘cd’ commands
We should test with Cabal, not stack, because it allows to test in more
adverse environment, test with GHC versions that are not yet in snapshorts,
and generally improve compatibility.
This script tests with Cabal 1.24, as it's compatible with all GHC versions
of interest and has a better dependency resolution algorithm that allows to
avoid some problems with builds.
I also would like to impose 100% Haddock coverage here.