Ticket #953 (new defect)
Opened 12 months ago
Alex-generated Lexer isn't found when building test-suite
| Reported by: | owst | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cabal library | Version: | 1.14.0 |
| Severity: | normal | Keywords: | |
| Cc: | Difficulty: | unknown | |
| GHC Version: | Platform: |
Description
I'd like to use my Alex-generated lexer in my test-suite. I've tried adding other-modules/build-tools to my test-suite section, but upon building the Lexer module isn't found.
I've got no problems using the lexer within my normal executable. Should I be able to use my Lexer in the test-suite?
I'll attach a fairly minimal example, the Main module and the TestSuite? module both use the Lexer, Main will compile, TestSuite? won't:
$ cabal configure --enable-tests $ cabal build [... blurb] Preprocessing test suite 'tests' for test-suite-with-alex-0.0...
tests/TestSuite.hs:7:8:
Could not find module `MyLexer?' Perhaps you meant Lexer (needs flag -package ghc-7.4.1) Use -v to see a list of the files searched for.

