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

NoUnused.Variables: Detect unused mutually recursive functions #18

Open
jfmengels opened this issue Dec 24, 2020 · 0 comments
Open

NoUnused.Variables: Detect unused mutually recursive functions #18

jfmengels opened this issue Dec 24, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jfmengels
Copy link
Owner

NoUnused.Variables doesn't notice that values and valuesFromList are used mutually but never used anywhere else (if that was the case).

type Tree value = Node value | Tree (List (Tree value))

values : Tree value -> List value
values tree =
	case tree of
		Node value -> [ value ]
        Tree list -> valuesFromList list

valuesFromList : List (Node value) -> List value
valuesFromList list =
  List.concatMap values list

We should improve the rule to make this kind of discovery and remove both functions.

@jfmengels jfmengels added the enhancement New feature or request label Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant