src/OptionalConfiguration.hs: use an explicit mappend.
I have a feeling that in older versions of GHC, the Monoid instance
is not smart enough to use an existing Semigroup instance for its
mappend implementation. Let's just make it explicit.
mailbox-count.cabal: depend on semigroups conditionally.
Just kidding, when the semigroups package promises "a backwards-
compatible API," what they mean is that they deleted the entire source
tree in the minor release 0.18.2 and nothing works at all. So instead,
we need to do a version check on GHC within the cabal file, and
conditionally depend on a version of semigroups before 0.18.2.
src/OptionalConfiguration.hs: make OptionalConfiguration.hs a Semigroup.
This fixes the build with >=ghc-8.4, where monoids must also be
semigroups. The "semigroups" package was added as a build dependency
to (hopefully) keep things working with older versions of GHC.
makefile: move ghc-options from the cabal file into the makefile.
We shouldn't be hard-coding user preferences into the cabal file that
everyone uses. Instead, GHC should support a variable like CFLAGS that
lets users and developers specify what warnings and optimizations they
would like to use. Instead, we have to fake it: I've standardized the
Gentoo HCFLAGS variable within the makefile, so that a few warnings
will be appended to the (exported) environment variable but otherwise
no flags will be forced by the cabal file.
This should work for me when I'm developing, because the warnings will
be appended to the HCFLAGS="-O2" that I have set in my environment. It
will work on Gentoo, because HCFLAGS are already passed to the cabal
build system in Gentoo. It will work(ish) everywhere else, because
nothing will get passed to the cabal build system, and that's okay.
Michael Orlitzky [Tue, 22 Apr 2014 15:28:02 +0000 (11:28 -0400)]
Move most of the report functionality into its own module.
Add an HUnit test suite (with sqlite3 database fixture).
Add a .ghci file.
Get the detail report working.