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
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to