Refactor the command-line argument parsing (again)
authorsimonpj@microsoft.com <unknown>
Mon, 16 Aug 2010 07:44:53 +0000 (07:44 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 16 Aug 2010 07:44:53 +0000 (07:44 +0000)
commit0cb74388d80c12f0804db61744a041be7fcfa10b
tree75a4a74f48826a55138b4a48bdb356bf2e6cb63f
parent4ac17e1a625698df98fdc807118c0bb81aefdeb1
Refactor the command-line argument parsing (again)

This change allows the client of CmdLineParser a bit more flexibility,
by giving him an arbitrary computation (not just a deprecation
message) for each flag.

There are several clients, so there are lots of boilerplate changes.

Immediate motivation: if RTS is not profiled, we want to make
Template Haskell illegal.  That wasn't with the old setup.
compiler/main/CmdLineParser.hs
compiler/main/DynFlags.hs
compiler/main/HscMain.lhs
compiler/main/StaticFlagParser.hs
ghc/Main.hs