
Included is a hack to allow haddock to parse GADTs. There are two
problems with it:
1. I don't think you can add doc comments to the constructors.
2. The shown types are wrong: the whole type of the constructor is shown
as if it were the type of a single argument. Fixing this will presumably
involve adding another constructor to HsConDecl to represent GADT
constructors.
It wouldn't be appropriate to release haddock in this state, but I think
it's helpful for those of us who could get no doc at all just because we
have a GADT in our code.
--
Ashley Yakeley
Seattle, WA
New patches:
[hack to parse GADTs, though with incorrect constructor types
Ashley Yakeley

Great stuff. However, David Waern's SoC project is very nearly at the point where he can generate Haddock for anything GHC understands; he's using GHC itself as the front end. He's recently added the rendering code for GADTs I think. I think he's probably planning a release shortly. David? Meanwhile Ashley's hack may well prove useful. Simon | -----Original Message----- | From: haskelldoc-bounces@haskell.org [mailto:haskelldoc-bounces@haskell.org] On Behalf Of Ashley | Yakeley | Sent: 07 February 2007 07:18 | To: haskelldoc@haskell.org | Subject: Haddock GADTs Hack | | Included is a hack to allow haddock to parse GADTs. There are two | problems with it: | | 1. I don't think you can add doc comments to the constructors. | | 2. The shown types are wrong: the whole type of the constructor is shown | as if it were the type of a single argument. Fixing this will presumably | involve adding another constructor to HsConDecl to represent GADT | constructors. | | It wouldn't be appropriate to release haddock in this state, but I think | it's helpful for those of us who could get no doc at all just because we | have a GADT in our code. | | -- | Ashley Yakeley | Seattle, WA
participants (2)
-
Ashley Yakeley
-
Simon Peyton-Jones