[Haskell-cafe] A Cabal problem

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue May 6 16:05:42 EDT 2008

On Tue, 2008-05-06 at 09:43 -0400, Mario Blazevic wrote:
> Trevor Elliott wrote:

> > Cabal doesn't pass the --main-is option, I believe because it is
> > specific to GHC.  What you could do is add this flag in the ghc-options
> > field of your executable in the cabal file, like this:
> > 
> > ghc-options: --main-is Shell
> 	That worked like charm, except the two dashes should be one (my 
> mistake). Thank you.

Note that hackage will reject packages that use "ghc-options: -main-is"
with the message that it is not portable. The rationale is that unlike
other non-portable extensions, it is easy to change to make it portable:
If you want to argue for supporting this ghc extension and/or implement
support (possibly with workaround support for the other haskell
implementations) then please do comment on the above ticket.


More information about the Haskell-Cafe mailing list