> There're several other ways to solve this: Thank you. You are right, GHC warns about shadowed variables. This "case" behaviour (patterns allow no access to outer scope variables) is different from some other languages. Well, I'll remember this from now on.