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

Hackage cvs-ghc at haskell.org
Wed Mar 23 12:05:59 CET 2011

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

  * status:  new => closed
  * resolution:  => wontfix


 The file name does not need to be Main.hs, it can be any name.hs that you

 The reason we do not support `-main-is` is because it is a ghc-specific
 extension that does not work for other Haskell implementations.

 Your example is easy to deal with. If you want one module with two
 targets, define both targets in one module, then have two other 2-line .hs
 files to be the main modules, e.g.:

 ozon = ...
 tests = ...

 import Ozon
 main = ozon

 import Ozon
 main = teste

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

More information about the cabal-devel mailing list