[Haskell-cafe] "shadowing" keywords like "otherwise"
Kim-Ee Yeoh
a.biurvOir4 at asuhan.com
Sun Jun 28 03:49:12 EDT 2009
Hi Vasili,
This isn't really a shadowing/redefinition issue. Here's
a perfectly legitimate snippet that compiles fine:
f 0 = 0
f otherwise = 1+otherwise
Redefinition is when you have:
g = let otherwise = not in x
-- Kim-Ee
VasiliIGalchin wrote:
>
> swishParse :: String -> String -> SwishStateIO (Maybe RDFGraph)
> swishParse fnam inp =
> do { fmt <- gets $ format
> ; case fmt of
> N3 -> swishParseN3 fnam inp
> otherwise ->
> do { swishError ("Unsupported file format: "++(show fmt))
> 4
> ; return Nothing
> }
> }
>
> I am receiving a shadow warning:
>
> Swish/HaskellRDF/SwishCommands.hs:304:12:
> Warning: Defined but not used: `otherwise'
>
> It seems to me that in the code base somewhere that there is a "redefine"
> of
> the keyword"otherwise". I haven't read the Haskell 98 Report but I thought
> that it was not possible to redefine keywords. ??
>
--
View this message in context: http://www.nabble.com/%22shadowing%22-keywords-like-%22otherwise%22-tp24239153p24239430.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list