darcs patch: Add a warning flag for when the Prelude is
implicitly ...
Isaac Dupree
isaacdupree at charter.net
Thu May 10 17:20:14 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Peyton-Jones wrote:
> | Tue May 8 18:09:25 EDT 2007 Isaac Dupree <id at isaac.cedarswampstudios.org>
> | * Add a warning flag for when the Prelude is implicitly imported (trac #1317)
> | GHC already determines all the implicit (Prelude) imports,
> | so we just need to check whether there are any of those,
> | for each module being compiled.
>
> Thanks; your patch looks fine to me, with minor thoughts:
>
> In the docs you say:
>
> + <option>-fno-implicit-prelude</option> or a
> + <literal>LANGUAGE NoImplicitPrelude</literal> pragma).</para>
>
> Have you actually altered the LANGUAGE pragma processing?
No, it's an existing LANGUAGE pragma (in fact I use it in one of the
test cases).
>
> Secondly, this flag should probably *not* be switched on by -Wall.
> Some warning flags are not: see using.xml line 851. I suggest
> you put your new flag in this cateogory, and figure out where to
> change the compiler's code to make that so.
It turned out that although the documentation, which I changed,
describes -Wall by subtractions from all documented warnings, the code
describes -Wall as additions to -W, which is described as additions to
the default warning flags. So I didn't need to change anything there
(and a manual test verifies that -Wall doesn't cause this warning where
- -fwarn-implicit-prelude does).
Thanks,
Isaac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGQ4yOHgcxvIWYTTURArP6AKCpUJUCO6cN29Aw1PNSyQ3MgKJhOQCg1jrm
AkCaB+ZQMDM2o8J2mnCPerA=
=SpTp
-----END PGP SIGNATURE-----
More information about the Cvs-ghc
mailing list