-keep-hc-files or -keep-hc-file?

Simon Marlow simonmarhaskell at gmail.com
Mon Jul 2 05:18:18 EDT 2007

Ian Lynagh wrote:
> On Thu, Jun 28, 2007 at 03:46:31PM +0200, Christian Maeder wrote:
>> Christian Maeder schrieb:
>>> I'm currently confused if it must be plural or singular (or any)
>>> http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#keeping-intermediates
>>> shows plural options whereas
>>>  http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id3131928
>>> shows them in singular (except -keep-tmp-files)
> Well spotted; thanks for reporting it!
>> The plural options work! So flag-reference.html should be corrected.
> In actual fact the flag reference was exactly right, except the flags
> could take any argument, which they then ignore (so the "s"s were being
> treated as an argument when you gave the flags as plurals).
> This meant that things like "-keep-s-file=no" would also result in the
> .s file being kept, so I've changed the code to accept only
> -keep-foo (makes sense when using ghc -c) and -keep-foos (makes sense
> when using ghc --make). -keep-tmp-files is still plural-only.
> Everything should be consistent now.

Just FYI, historically, these flags were called -keep-hc-file-too, 
-keep-s-file-too, etc.   When I rewrote the driver I made it ignore the suffix, 
so that I could shorten the flag names and keep backwards compatibility.  I 
don't think anyone still uses the old names.


More information about the Glasgow-haskell-users mailing list