[Haskell-cafe] A Cabal problem

Mario Blazevic mblazevic at stilo.com
Tue May 6 09:43:23 EDT 2008


Trevor Elliott wrote:
> 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

	That worked like charm, except the two dashes should be one (my 
mistake). Thank you.




More information about the Haskell-Cafe mailing list