Use -X for language extensions
authorsimonpj@microsoft.com <unknown>
Wed, 20 Jun 2007 16:26:56 +0000 (16:26 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 20 Jun 2007 16:26:56 +0000 (16:26 +0000)
commit5e05865dffed03c40b5d15831d26f903d5d73ede
tree71c66df7aeee3cbf668d65ccd874f19a21fdd025
parent2a2c42752bd416750fef7a9bb8e0ce6fd01cb278
Use -X for language extensions

We've often talked about having a separate flag for language extensions,
and now we have one. You can say

-XImplicitParams
-X=ImplicitParams
-Ximplicit-params

as you like.  These replace the "-f" flags with similar names (though
the -f prefix will serve as a synonym for -X for a while).

There's an optional "=", and the flag is normalised by removing hyphens
and lower-casing, so all the above variants mean the same thing.

The nomenclature is intended to match the LANGUAGE pramgas, which are
defined by Cabal.  So you can also say

{-# LANGUAGE ImplicitParams #-}

But Cabal doesn't have as many language options as GHC does, so the -X
things are a superset of the LANGUAGE things.

The optional "=" applies to all flags that take an argument, so you can,
for example, say

-pgmL=/etc/foo

I hope that's ok.  (It's an unforced change; just fitted in.)

I hope we'll add more -X flags, to replace the portmanteau -fglasgow-exts
which does everything!

I have updated the manual, but doubtless missed something.
compiler/main/CmdLineParser.hs
compiler/main/DynFlags.hs
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml