You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is indeed very confusing, and I think there are two separate problems:
when within is used, everything else including as is ignored, like you said
To restrict importing a module itself, one must use within, otherwise the restriction won't apply (i.e., the import is allowed everywhere). But when restricting something else, such as module alias, within is not needed for the restriction to take effect (in fact you can't even use within because of the point above). The behaviors are inconsistent.
I'm marking this as a good first issue. The function that needs updating is Hint.Restrict.checkImports.
We want to gradually become consistent with our naming of
Data.List.NonEmpty
, so we create anhlint
rule:I run
hlint
on our codebase to get all the currently failing examples, and I create awithin
to ignore them:But now it starts complaining about importing
Data.List.NonEmpty
at all. It seems likewithin
is causing it to ignore theas:
key.The text was updated successfully, but these errors were encountered: