Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find more uses of imports in patterns #226

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dzhu
Copy link

@dzhu dzhu commented Jan 4, 2020

I had some code, something like the sample below, that was incorrectly triggering the "unused import" warning:

-- A.elm
module A exposing (A(..))

type A =
    A Int

-- B.elm
module B

import A

x =
    \(A.A _) -> 0

This PR fixes that case and several other ones where imported modules are only used in patterns. I tested by updating my code for each case and testing that the warning disappeared when I added the checking code to handle that case (and by adding new tests that failed with the old code but pass with the new code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant