[Haskell] ANNOUNCE: ghc-src version 0.2.0
john at repetae.net
Wed Aug 24 20:47:53 EDT 2005
On Wed, Aug 24, 2005 at 10:14:58AM +0100, Duncan Coutts wrote:
> On Wed, 2005-08-24 at 10:56 +0200, Lemmih wrote:
> > On 8/24/05, Krasimir Angelov <kr.angelov at gmail.com> wrote:
> > > 2005/8/24, John Meacham <john at repetae.net>:
> > > > ooh. neat. any chance it could be extended to preserve haddock comments
> > > > and attach them to the right places? I thought it would be really cool
> > > > if compilers could use the haddock documentation when printing out error
> > > > messages and be able to query documentation as well as type info from
> > > > inside the interpreter.
> > > > John
> > >
> > > I think that it could be more useful to preserve all comments. Haddock
> > > can filter out only the haddock style comments but there are tools
> > > that use another style of comments.
> > I can't really imagine what the AST would look like if it should
> > support comments in arbitrary places.
> Haddock annoations cannot appear in arbitrary places.
> They can be attached to the top level module, exported symbols, function
> defeinitions, function arguments, data types, data constructors (and
> possibly one or two things I've forgotten). So they can all be attached
> to sensible places in the AST.
Ideally, the parser would not try to look inside the haddock comments,
but would just look at the character indicator to attach them to the
right place in the AST and just store them as raw strings.
that way the parse doesn't fail due to misformed comments and one is
free to use different documentation styles (perhaps latex or html
comments or something else wacky) as long as the attachment points and
indicators are the same.
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell