Cabal is conflicted over two locations for the "Lexical.Token" module. Confusingly, they're both the same file.
- It's resolving
mylib-0.0.0.1
from yourbuild-depends
to the "locally installed and registered" version ofmylib
. - It's resolving
Lexical.Token
in the source as another-modules
entry, something that should be exposed through your test suite.
Fix it be removing Lexical.Token
from other-modules
, I imagine. Your test suite should not share code with your tested code, but instead import all the modules as if your tested code were an external library.