@-bindings broken in 6.0?

Simon Marlow simonmar@microsoft.com
Tue, 24 Jun 2003 13:50:49 +0100


=20
> > I think lumping all these extensions under one switch is the
> > problem.
>=20
> Yep, I agree. Would it be hard to split `-fglasgow-exts'
> up? I'd greatly appreciate a more fine-grained control
> here.=20

The only difficulty is that we don't have an easy way to parameterise
the parser, since it's generated from a fixed grammar.  It might be
possible to do it by having multiple entry points to the parser, sharing
as much of the grammar as possible, but I haven't tried (it sounds a bit
sledgehammerish).

We can often do optional syntax by parameterising the lexer, however: in
fact there are already four switches that affect the syntax
(-fglasgow-exts, -farrows, -fwith, -fffi).  These generally work by
turning on or off certain keywords (eg. -fffi turns on the 'foreign'
keyword), which is usually all you need.

Bottom line: yes in most cases you can give separate extensions their
own flags.  We're starting to move in that direction for new extensions,
and if we get around to it we might separate some of the existing
extensions.

Cheers,
	Simon