[Haskell] ANNOUNCE: ghc-src version 0.2.0
Arthur Baars
arthurb at cs.uu.nl
Tue Aug 30 07:04:36 EDT 2005
Daan is right, I wrote a parser for GHC using Doaitse Swierstra's
parsing combinator library
(http://www.cs.uu.nl/groups/ST/Software/UU_Parsing/index.html).
I needed a drop-in replacement for GHC's Happy parser, to make a
prototype for syntax macros. Syntax Macros allow a programmer to extend
a language with new syntax. Combinator based parsers parsers can be
dynamically extended, making them suitable for implementing syntax
macros. Unfortunately, I never had time to really finish the syntax
macro implementation.
But I did finish the combinator based parser for GHC. I tested it by
having GHC( with combinator parser) compile itself and all the
libraries. This took about 10% longer than with the original GHC, so in
practice its speed is acceptable. The parser is really a drop-in
replacement for GHC 6.2.1. You only need to replace Parser.hs, add a
line to Lexer.x and to a Makefile. I do not have time to maintain a
combinator based parser for GHC. So if you like, I can send you the
code.
Arthur
On 30-aug-05, at 5:13, Daan Leijen wrote:
> Brian Smith wrote:
>> I heard that there is some combinator-based Haskell parser that also
>> is equivalent to GHC's Happy-based one, and is within 10% of its
>> performance. I had thought that I read that GHC might even start
>> using it. Does anybody know if the combinator-based one is available?
>
> This work has been done Arthur Baars -- he actually replaced the ghc
> parser by his combinator parser and build Ghc + standard libraries
> with it which took 10% longer than using the Happy parser. You should
> probably contact him to get more information. One interesting thing is
> that the combinator parser can use syntax macros and thus extend the
> syntax of Haskell at compile time in a type-safe way.
>
> All the best,
> -- Daan Leijen.
>
> ps. When you check out Arthur's webpage, be sure to read the
> "Typing dynamic typing" article -- it is a great paper!
>
>
>> Thanks,
>> Brian
>> ----------------------------------------------------------------------
>> --
>> _______________________________________________
>> Haskell mailing list
>> Haskell at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell
>
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>
More information about the Haskell
mailing list