Chris Dornan <[EMAIL PROTECTED]> writes:

> ghc has started getting quite chatty in 2.0x; some of the chatter is very
> useful.  However, could I suggest that the warning messages provided by default
> be deployed sparingly.  I would be inclined to provide warnings only if a
> warnings flag is provided -- it is nice to have large builds proceed with only
> the important stuff hitting the screen.  While developing, the warnings would
> be enabled of course.

By default, you get a standard set of warnings with GHC.  These are:
-fwarn-incomplete-patterns and -fwarn-overlapping-patterns.  There are
also -fwarn-name-shadowing and -fsignatures-required, which aren't
enabled by default.

I take your point that this isn't very consistent:  there should be a
way to turn off all warnings easily.  What do other people think?

The options are:

        * have all warnings off by default, a standard set of warnings
          being available by adding the -W command line option.

        * have a standard set of warnings on by default, with all
          warnings being turned off by the -Wnot (or something) flag.

This is in addition to each warning being selectable independently via
the relevant command-line flag.

> Here are some of the diagnostics with my comments:
> 
>   foo.lhs:492: No explicit method nor default method for `bar'
>               in an instance declaration for `PriorityQueue'

This is a warning, and should say so.

>   foo.lhs:155: 
>       Warning: Possibly incomplete patterns
>           in the definition of function `foobar'

The incomplete pattern detector is currently sound but not complete (I
believe), but this is being worked on.

>   NOTE: Simplifier still going after 4 iterations; bailing out.

>   ghc: module version changed to 4; reason: exports changed

These messages come from us wanting to know exactly what's going on -
any hint of trouble could point to a possible bug.  I agree this stuff
should be turned off by default.

Cheers,
        Simon

-- 
Simon Marlow                                             [EMAIL PROTECTED]
University of Glasgow                       http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key

Reply via email to