[Haskell-cafe] coding standard question

Henning Thielemann lemming at henning-thielemann.de
Wed Jun 24 06:25:46 EDT 2009

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:
  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 

>  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.)

More information about the Haskell-Cafe mailing list