patch applied (ghc): Use -X for language extensions

Simon Peyton Jones simonpj at microsoft.com
Wed Jun 20 12:37:10 EDT 2007


Wed Jun 20 09:26:56 PDT 2007  simonpj at microsoft.com
  * 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.
  
  
  

    M ./compiler/main/CmdLineParser.hs -10 +11
    M ./compiler/main/DynFlags.hs -32 +100
    M ./docs/users_guide/flags.xml -39 +39
    M ./docs/users_guide/glasgow_exts.xml -61 +87



More information about the Cvs-ghc mailing list