[Haskell] ANNOUNCE: ghc-src version 0.2.0

Duncan Coutts duncan.coutts at worcester.oxford.ac.uk
Mon Aug 29 10:03:15 EDT 2005

On Wed, 2005-08-24 at 00:29 +0200, Lemmih wrote:
> On 8/23/05, John Meacham <john at repetae.net> wrote:
> > On Tue, Aug 23, 2005 at 04:10:51PM +0200, Lemmih wrote:
> > > ghc-src 0.2.0 has been released.
> > >
> > > ghc-src is a Haskell parser with full support for every GHC extension.
> > > It is a refactored version of the Haskell parser used internally by
> > > GHC and is meant as a replacement for haskell-src-exts, although it
> > > might have other uses.
> > > The package is cabalized and lives under Langauge.Haskell.GHC.* in the
> > > module hierarchy.
> > >
> > > Darcs repo: http://scannedinavian.org/~lemmih/ghc-src/
> > 
> > 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.
> Parsing Haddock comments would be pretty easy. However, compilers
> probably wont find ghc-src very usable since it has no placeholders
> for post-parsing information (such as inferred types).

However it would be great for replacing the parser that haddock
currently uses!

This would be a nice thing to do, that is make haddock use this parser,
since then it would accept exactly the same language that ghc accepts.

When running haddock I often have to fix things where haddock is
stricter than ghc's parser. And haddock's current error messages are not
very good, they do not give source locations very accurately, unlike ghc
which has excelent parser error messages.


More information about the Haskell mailing list