[Hackage] #179: support GHC's main-is extension

Hackage cvs-ghc at haskell.org
Mon Mar 7 00:50:00 CET 2011

#179: support GHC's main-is extension
  Reporter:  duncan         |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  low            |    Milestone:  _|_    
 Component:  Cabal library  |      Version:
  Severity:  normal         |     Keywords:         
Difficulty:  normal         |   Ghcversion:  6.4.2  
  Platform:  Linux          |  

Comment(by cjs):

 Right. Note that while the same source file can be used both as a "Main"
 file and a library file by using or not the --main-is option, changing
 that switch produces different object files. Thus, if you are using a file
 for both purposes (e.g., a library module that also includes a main used
 as part of a test system, because it needs access to stuff you'd rather
 not expose to the library users) you'll need to compile your two versions
 to two separate locations.

 I solved this in my build system by having a separate directory for
 interface and object files compiled with --main-is.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/179#comment:11>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list