Whoops, you're right. Interestingly, the shadowing warnings vary between the 2 examples I gave, i.e. shadowing within 'function definition' vs 'binding group'. Felipe Lessa wrote:
On Sun, Jun 28, 2009 at 12:49:12AM -0700, Kim-Ee Yeoh wrote:
This isn't really a shadowing/redefinition issue. Here's a perfectly legitimate snippet that compiles fine:
f 0 = 0 f otherwise = 1+otherwise
What? It is a redefinition issue *as well*, but this kind of warning isn't active by default
Prelude> :s -Wall Prelude> let f 0 = 0; f otherwise = 1 + otherwise
<interactive>:1:15: Warning: This binding for `otherwise' shadows the existing binding imported from Prelude In the definition of `f'
-- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- View this message in context: http://www.nabble.com/%22shadowing%22-keywords-like-%22otherwise%22-tp242391... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.