[Hackage] #817: "main-is" misparsed in if/else, only by sdist

Hackage cvs-ghc at haskell.org
Tue Mar 22 06:51:16 CET 2011


#817: "main-is" misparsed in if/else, only by sdist
----------------------------+-----------------------------------------------
  Reporter:  jeffwheeler    |        Owner:          
      Type:  defect         |       Status:  new     
  Priority:  normal         |    Milestone:          
 Component:  Cabal library  |      Version:  1.10.0.0
  Severity:  normal         |     Keywords:          
Difficulty:  unknown        |   Ghcversion:          
  Platform:                 |  
----------------------------+-----------------------------------------------
 An if/else block which sets the main-is value for an executable based on a
 flag is misparsed when running "cabal sdist" (it's parsed correctly when
 running "cabal install").

 Upon failure, it appears that it's looking for a filename that is the two
 main-is options concatenated together. E.g., I get the error "cabal:
 HackerMain.hsMain.hs doesn't exist".

 The problematic bit looks like:

 if flag(hacking)
   main-is: HackerMain.hs
 else
   main-is: Main.hs

 My entire config can be found on hpaste: http://hpaste.org/44939/yicabal
 (problematic lines around 268).

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



More information about the cabal-devel mailing list