[Haskell-cafe] "shadowing" keywords like "otherwise"

Bulat Ziganshin bulat.ziganshin at gmail.com
Sun Jun 28 03:48:18 EDT 2009


Hello Vasili,

Sunday, June 28, 2009, 10:39:37 AM, you wrote:

>         ; case fmt of
>              N3        -> swishParseN3 fnam inp
>             otherwise ->
>                 do  { swishError ("Unsupported file format: "++(show fmt)) 4
>                     ; return Nothing
>                     }
>          }

first, otherwise aka True is used in *condition* part of case
statement. here you should use _

second, otherwise isn't a keyword, just a Prelude definition. here,
you assign fmt value to this identifier


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list