fixed cabal file (it builds now!); fixed errors and warnings revealed by cabal build