sol/haddock — pull request #1 by Fuuzetsu (2013-07-08 04:21:25+00:00)
Title: Alex/Happy replacement

Replaces the Alex/Happy combo to enable for easier extension of Haddock's capabilities. The replacement is made with ByteString version of Attoparsec which is now bundled in the source (under src/Data/Attoparsec). Any Attoparsec modules that were not being used (either directly or indirectly) were removed to save some clutter.

The cabal file was updated accordingly but I'm not 100% confident if it's correct.

Currently done in two passes and mimics the structure of the original parses. This is for ease of testing and debugging while trying to develop a backwards compatible parser. It's very likely that this will get merged into a single pass parsing.

I have added some more HUnit tests, testing simple functionality of the parser. Both the old parser and this one pass all tests. No HTML tests were added but 4 were removed due to unresolved issues with Template Haskell and the fact that the failures were fatal to the testing process.

Travis CI was set up to automatically build GHC HEAD and run `cabal test`. Unfortunately, it seems to be about 50% chance of it fitting under its 50 minute test time. I believe that GHC HQ is sorting out the nightly binaries again which would make this far more reliable.

Performance wise, the parsers seem to be about the same. Building HXT documentation (~80 files):
```
Alex/Happy: 5.52s user 0.53s system 104% cpu 5.805 total
Attoparsec: 5.49s user 0.62s system 102% cpu 5.940 total
```
Note that there is 0 optimisation going on in the new parser at the moment.

This pull request includes the TypeFamilies change that is already in darcs upstream but is not in this repository. Maybe a rebase is in order or simply discarding that one type families commit and pulling from upstream first is more appropriate.