In-depth haddock documentation and test framework