I fixed this. The problem was that we had pulled in files from elsewhere (the AFRP library), which were not written with haddock in mind. I was able to get haddock to work by escaping all occurrences of $'s and *'s that came after a dash. Too bad the error message is unrelated to the problem.<div>
<br><br><div class="gmail_quote">On Wed, Apr 21, 2010 at 6:30 PM, Ashish Agarwal <span dir="ltr"><<a href="mailto:agarwal1975@gmail.com">agarwal1975@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've setup a cabal file for a project. Building works fine but cabal haddock gives the following error:<div><br></div><div><div>src/AFRP/AFRP.hs:1:0:</div><div> File name does not match module name:</div><div> Saw: `Main'</div>
<div> Expected: `AFRP.AFRP'</div><div><br></div><div>However, the module name specified in AFRP.hs is in fact AFRP.AFRP so why is haddock seeing Main, especially since cabal build completes successfully?</div><div>
<br></div></div>
</blockquote></div><br></div>