Apply minor changes suggested by HLint.
Convert documentation comments to Haddock format.