[Hackage] #953: Alex-generated Lexer isn't found when building test-suite

Hackage cvs-ghc at haskell.org
Wed May 16 00:24:13 CEST 2012


#953: Alex-generated Lexer isn't found when building test-suite
----------------------------+-----------------------------------------------
  Reporter:  owst           |        Owner:        
      Type:  defect         |       Status:  new   
  Priority:  normal         |    Milestone:        
 Component:  Cabal library  |      Version:  1.14.0
  Severity:  normal         |     Keywords:        
Difficulty:  unknown        |   Ghcversion:        
  Platform:                 |  
----------------------------+-----------------------------------------------
 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/953>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list