[Haskell-beginners] Warnings from ghc
daniel.is.fischer at googlemail.com
Sun Apr 3 17:59:28 CEST 2011
On Sunday 03 April 2011 17:24:52, Manfred Lotz wrote:
> Hi there,
> From my experiences in programming it is usually a good thing when
> a compiler issues warnings because this shows me where in my code there
> might be future problems hidden.
> I found the following warnings especially important to be turned on:
I find that one rather annoying most of the time.
It's good if you write stuff like
mapM bar baz
but it's just superfluous in situations like
printf format some vars
which I have much more frequently (I don't remember ever having typo'ed
mapM when I meant mapM_ or similar, doesn't mean it never happened, but
it's rare - for me, at least)
> I see that I could turn on all warnings with -Wall but that is a bit too
I tend to use
-Wall -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-type-defaults
(unless I want to be warned on type-defaulting or unused do-binds, of
Switch on everything and explicitly switch off what you consider okay in
> My question: what other options do people recommend to be turned on.
More information about the Beginners