On Mon, 22 Jun 2009, Neil Brown wrote:

I would agree to a certain extent about the warnings. Name shadowing is not really a problem, and it's often hard to avoid shadowing names that already exist in an imported module (why shouldn't I have a variable named lines?).

If you follow this advise:
  http://haskell.org/haskellwiki/Import_modules_properly
 then you have no problem with name clashes.

It's also usually the case that when I write inexhaustive pattern matches, it's because I know that the function (in a where clause) cannot be called with the missing pattern.

Then it is certainly better to show by types, which patterns are possible and which are not. If this is not possible, then is still better to use "error" for giving an explanation, why you think that this pattern cannot occur.

Type defaulting and monomorphism bits may be useful to some, but I only usually fix them to get rid of the warning, not because they cause a problem.

Type defaulting is a problem for the reader, since he can not easily infer, what type an expression has. (He must know the defaults.)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to