RE: [Haskell] ANNOUNCE: ghc-src version 0.2.0

On 30 August 2005 12:05, Arthur Baars wrote:
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.
With all due respect, a 10% increase in compile time isn't acceptable at all! And when you consider that parsing is less than 10% of compile time overall (probably much less), a 10% increase represents at least a factor of 2 in the parser. I'm not criticising the work at all - far from it, just the notion that we would consider adding 10% to GHC's compile times "acceptable". I've recently been struggling to shave a few percent off GHC's compile times, BTW :-) Cheers, Simon

Hello Simon, Tuesday, September 13, 2005, 5:00:17 PM, you wrote:
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.
SM> With all due respect, a 10% increase in compile time isn't acceptable at SM> all! ability to extend/change Haskell syntax will be very interesting. i will be glad to see it in some Haskell compiler, at least as alternative front-end. for example, this give us ability to implement automatic lifting with `borrow` keyword, dicussed now in Haskell ML -- Best regards, Bulat mailto:bulatz@HotPOP.com
participants (2)
-
Bulat Ziganshin
-
Simon Marlow