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
{{ message }}
Repository navigation
"There were multiple candidates for the Cabal entry" warnings when building happy #4076
When building happy with stack (stack build, using this fork), stack issues these warnings:
Warning: There were multiple candidates for the Cabal entry " Parser
* C:\stack\src\Parser.ly
picking: C:\stack\src\Parser.hs
Warning: There were multiple candidates for the Cabal entry " AttrGrammarParser
* C:\stack\src\AttrGrammarParser.ly
picking: C:\stack\src\AttrGrammarParser.hs
[1 of 2] Compiling Main ( C:\sr\setup-exe-src\setup-Z6RU0evB.hs, C:\sr\setup-exe-src\setup-Z6RU0evB.o )
It seems like we should update the logic in Stack that maps module names to path names with the following tweak: if there are two files related to a module name, and they are identical except for a different file suffix, and one of them ends in .hs or .lhs, assume that it's autogenerated and ignore it. Alternatively, maybe track both of those files, and simply don't warn.
This should be a relatively straightforward change to the codebase, I'm labeling it as a newcomer friendly issue if someone wants to take a crack at it.
Activity
snoyberg commentedon Jun 19, 2018
It seems like we should update the logic in Stack that maps module names to path names with the following tweak: if there are two files related to a module name, and they are identical except for a different file suffix, and one of them ends in
.hsor.lhs, assume that it's autogenerated and ignore it. Alternatively, maybe track both of those files, and simply don't warn.This should be a relatively straightforward change to the codebase, I'm labeling it as a newcomer friendly issue if someone wants to take a crack at it.
Resolve multiple candidates from preprocessors (fixes #4076)
snoyberg commentedon Aug 8, 2018
I've added a commit to fix this on the pantry branch.
Another warning reduction like #4076