
#179: support GHC's main-is extension ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: closed Priority: low | Milestone: _|_ Component: Cabal library | Version: 1.2.2.0 Severity: normal | Resolution: wontfix Keywords: | Difficulty: normal Ghcversion: 6.4.2 | Platform: Linux ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => wontfix Comment: The file name does not need to be Main.hs, it can be any name.hs that you like. 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.hs: {{{ ozon = ... tests = ... }}} main.hs: {{{ import Ozon main = ozon }}} tests.hs: {{{ 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