Vasili I. Galchin wrote:

>      I am working with some existing code. "where/let" functions use the
> same name for function parameters as the outer function and hence there is a
> "shadow" warning from the compiler. To me it doesn't see totally
> unreasonable to code like this .... the downside is the nasty ghc warnings.
> Is there a coding consensus on this issue?

I'm relatively new to Haskell, but I know that in imperative
languages like C, a small percentage of "shadow" warnings are
often real bugs and hence always worth fixing if possible 
(sometimes the problem is in system header files and hence 
can't be fixed).

In Haskell there is an easy way around this. Variables can
be name a, a', a'' and so on. Since these aid in clarity
without forcing you to think up new variable names, I would
suggest that its a good idea to fix these warnings.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to