[Haskell-beginners] Useful set of -W switches for .ghci?
Александър Л. Димитров
aleks_d at gmx.de
Fri Dec 5 13:03:33 EST 2008
Hey list,
I'm currently using :set -Wall in my .ghci to enforce some good coding practices
on my side. Something like missing type signatures and the like. It has saved me
quite a lot of hassle over the last couple of days as I experimented more with
Haskell. But it seems, -Wall may be just a little too… overzealous:
Prelude> 2^2
Warning: Defaulting the following constraint(s) to type `Integer'
`Num t' arising from a use of `^' at <interactive>:1:0-2
Warning: Defaulting the following constraint(s) to type `Integer'
`Integral t' arising from a use of `^' at <interactive>:1:0-2
Warning: Defaulting the following constraint(s) to type `Integer'
`Num t' arising from a use of `^' at <interactive>:1:0-2
Warning: Defaulting the following constraint(s) to type `Integer'
`Integral t' arising from a use of `^' at <interactive>:1:0-2
4
(I've shortened ghci's response a bit)
So, do you have a good (recommended) set of -W switches for a newbie playing
around in GHCi, so I can learn a good style? Forgive me if it's somewhere on
page one of some book or tutorials - I've read so many of both, I'm beginning to
forget things.
Thanks,
Aleks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/beginners/attachments/20081205/6b8ef7aa/attachment.bin
More information about the Beginners
mailing list