GHC changes

Simon Marlow simonmar at microsoft.com
Mon Nov 3 13:46:25 EST 2003


 
> I have made some changes to the GHC source
> code (6.0.1) and I would really welcome your
> feedback, whether they are ok for my task
> (first step: introduce record expressions
> of the shape 'struct {x1=e1,x2=e2,...,xn=en}'):
> 
> * added
> 
>  ("struct", ITstruct, bit glaExtsBit),
> 
>  to ghcExtensionKeywordsFM and
>  ITstruct to Token in Lex.lhs

GHC's lexer is now based on an Alex specification, so this will be
different in future GHCs.

>   'struct'       { ITstruct }
> 
>  to the token part of Parser.y (please tell me, why
>  in the lexer we declare ITstruct to represent
>  the keyword "struct" and in the parser specification
>  we turn back to 'struct'),

In the parser 'struct' is just a token used in the grammar file, it
doesn't represent an actual Haskell string.

> How can I speed up the recompilation process? I just want to 
> check, whether my
> changes are compilable or not, is it possible to switch off 
> optimization and
> other time consuming transformations?

You should definitely turn off optimisation when developing GHC.  The
Building Guide describes how to do this:

 
http://www.haskell.org/ghc/docs/latest/html/building/building-guide.html

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list