id,summary,reporter,owner,description,type,status,priority,milestone,version,resolution,keywords,cc
57,haddock doubles ^Ms,igloo,,"Originally reported here:
http://www.haskell.org/pipermail/cvs-ghc/2008-August/044392.html
by Neil Mitchell.

We can skip the CPP part from his report if we start with this Foo.hs:

{{{
^M
module Foo where^M
^M
-- | > test a^M
test :: a^M
test = undefined^M
}}}

(CPP in Neil's message just ensures that there are `^M`s in the file)

Then running
{{{
haddock.exe --hoogle Foo
}}}

gives us a main.txt containing
{{{
-- Hoogle documentation, generated by Haddock^M
-- See Hoogle, http://www.haskell.org/hoogle/^M
^M
@package main^M
^M
module Foo^M
^M
-- | <pre>^M
--   test a^M^M
--   </pre>^M
test :: a^M
}}}

Note the double `^M`. 

I suspect that this happens because the file is read with something like `lines` (which leaves the `^M` in the string) and then written with something like `hPutStrLn` (which appends `^M\n` to the string). I don't know exactly which `lines` or `hPutStrLn`, but I think they're more likely to be in haddock than GHC, so I'm filing the bug here.
",defect,closed,major,,,fixed,,ndmitchell@…
