Problem building GHC

Simon Marlow simonmar at microsoft.com
Tue Jul 19 05:46:37 EDT 2005


On 18 July 2005 17:29, Dinko Tenev wrote:

> On 7/18/05, Simon Marlow <simonmar at microsoft.com> wrote:

>> That's the general rule, anyway.  It would be an interesting
>> exercise to specify the GHC command-line semantics, or better still,
>> redesign it :) 
> 
> I for one would find it quite helpful to see a warning line for each
> overriden option, if without so much of an explanation -- a "red
> light" to let me know something might be wrong.

I think there's a difference of philosophy here: overriding options is
considered normal usage on the GHC command line.  We expect to be able
to do things like "make EXTRA_HC_OPTS=-Onot" to turn off optimisation,
for example - we don't want this usage to generate a warning for every
compilation.

Every flag you specify on the command line is in effect overriding the
default.  We often override global defaults by putting pragmas in source
files.  e.g. you wouldn't want a warning for putting {-# OPTIONS
-fno-warn-overlapping-patterns #-} in a source file, despite the fact
that this overrides -Wall on the command line.

I think there's a case for warnings in some cases (e.g. -keep-hc-files
vs. -fasm might warrant a warning), but not in general.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list