[Haskell] ANNOUNCE: ghc-src version 0.2.0

Duncan Coutts duncan.coutts at worcester.oxford.ac.uk
Wed Aug 24 05:14:58 EDT 2005


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.

Duncan



More information about the Haskell mailing list