By the time it gets to the type checker, the %
operator has been desugared to
Var (Qualified (Just (ModuleName [ProperName "Main"])) (Ident "f"))
.
The f
introduced by the let
binding is unqualified (Qualified Nothing (Ident "f")
), and it seems that
the qualified f
is removed from the environment inside the scope of the let
. I think that they should both be in
scope, since they are different variables- one qualified, and one not.
It doesn't seem to be a general problem with let
bindings and qualified names, because this compiles: