[Haskell-cafe] A Cabal problem

Trevor Elliott trevor at galois.com
Mon May 5 13:40:20 EDT 2008


On Mon, 05 May 2008 13:37:12 -0400
Mario Blazevic <mblazevic at stilo.com> wrote:

> Trevor Elliott wrote:
> > Hi Mario,
> > 
> > Is the name of the module within the Shell.hs file Main?  If not,
> > that could be your problem.
> 
> 	You may be right, the module's name is Shell, not Main. GHC
> does not have problem with that when "--main-is Shell" option is
> specified on the command line. Is Cabal different? Is this documented
> somewhere?

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

--trevor


More information about the Haskell-Cafe mailing list