haddock...ing the source code

Hi, so, I started working on adding full haddock support to the XMonad source code, but it seems that haddock itself must be patched first, since it does not deal with "deriving" from parametrized types, such as the type X: deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader Xconf)) A small change in the code of the haddock parser solves the problem, but still haddock does not handle "deriving" very well and I do not think that using a preprocessor is an option.[1] Here you can see what I can get with a patched haddock: http://gorgias.mine.nu/xmonad/XMonad.html What do you think? Shall we forget about it? Is it useful to have a "patched-haddock" support? Ciao andrea [1] http://haskell.org/haddock/haddock-html-0.8/deriving.html

On Sun, Jun 10, 2007 at 09:06:14AM +0200, Andrea Rossato wrote:
Hi,
so, I started working on adding full haddock support to the XMonad source code, but it seems that haddock itself must be patched first, since it does not deal with "deriving" from parametrized types, such as the type X: deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader Xconf))
A small change in the code of the haddock parser solves the problem, but still haddock does not handle "deriving" very well and I do not think that using a preprocessor is an option.[1]
Here you can see what I can get with a patched haddock: http://gorgias.mine.nu/xmonad/XMonad.html
What do you think? Shall we forget about it? Is it useful to have a "patched-haddock" support?
Haddock already supports this, just not in the stable version: http://darcs.haskell.org/SoC/haddock.ghc/ Stefan

On Sun, Jun 10, 2007 at 12:09:21AM -0700, Stefan O'Rear wrote:
Haddock already supports this, just not in the stable version:
that requires ghc HEAD. For the time being I'll make the source code haddock compatible (using my patched version of haddock-0.8), then we will see. Thanks for you kind attention. ciao andrea

mailing_list:
On Sun, Jun 10, 2007 at 12:09:21AM -0700, Stefan O'Rear wrote:
Haddock already supports this, just not in the stable version:
that requires ghc HEAD. For the time being I'll make the source code haddock compatible (using my patched version of haddock-0.8), then we will see.
That seems a reasonable step.
Thanks for you kind attention.
-- Don

Hi Attached is a patch that fixes up the haddock derivation for everything apart from newtype deriving. I have a script running that haddock's each of several repo's every night. I've now added XMonad to the list of things it works over. It doesn't currently succeed - because of that newtype stuff, but when it does: http://www.cs.york.ac.uk/fp/haddock/xmonad/ I would guess that if your newtype deriving Patch is small enough, it should be suitable for use in the old version of Haddock. If when submitting to Simon, you also CC me on the haddock patch, I'll apply it to the local copy of haddock. Thanks Neil

On Sun, Jun 10, 2007 at 12:04:49PM +0100, Neil Mitchell wrote:
Attached is a patch that fixes up the haddock derivation for everything apart from newtype deriving.
mine is far more intrusive, and aims at building a nicely formatted and complete documentation. you can have a look at the results here: http://gorgias.mine.nu/xmonad/ I'm not done yet: there some issues I'm trying to work out (new to haddock too!), such as the description and a nice title on the first page. I'll try to work them out. Let me know what you think.
I would guess that if your newtype deriving Patch is small enough, it should be suitable for use in the old version of Haddock. If when submitting to Simon, you also CC me on the haddock patch, I'll apply it to the local copy of haddock.
Well, just a single line to permit the parsing of something like: deriving (MonadState XState) It does not resolve this problem: http://haskell.org/haddock/haddock-html-0.8/deriving.html but does not give a parsing error back. Let me review it. I'll be sending it later. Ciao Andrea

Hi
Attached is a patch that fixes up the haddock derivation for everything apart from newtype deriving.
mine is far more intrusive, and aims at building a nicely formatted and complete documentation.
Please delete my patch, and use the one from Andrea. It looks very nice.
It does not resolve this problem: http://haskell.org/haddock/haddock-html-0.8/deriving.html but does not give a parsing error back.
Let me review it. I'll be sending it later.
Good good :) Thanks Neil

On Sun, Jun 10, 2007 at 02:24:32PM +0100, Neil Mitchell wrote:
It does not resolve this problem: http://haskell.org/haddock/haddock-html-0.8/deriving.html but does not give a parsing error back.
Good good :)
ok, this is just a work around: it wont give an error if a ',' is not found, basically. The type is pushed in the list of classes, and there you see it. It's linked to its definition though. The result it's a bit of a mess, but still useful, probably. ciao andrea
participants (4)
-
Andrea Rossato
-
dons@cse.unsw.edu.au
-
Neil Mitchell
-
Stefan O'Rear