[Haskell-cafe] Using Cabal during development

Neil Brown nccb2 at kent.ac.uk
Wed Feb 10 09:11:19 EST 2010

Don't you simply need to do what the error message says, and add (*in 
the Executable section*, at the end of the file):

build-depends: SFML


Limestraël wrote:
> I think I must be dumb or something.
> I did my SFML.cabal exactly the way the packager of vty-ui did vty-ui.cabal,
> and I still have got the error when building:
> hs_src/SFML/Direct/Graphics.hs:51:7:
>     Could not find module `SFML.Direct.Types.Enums':
>       It is a member of the hidden package `SFML-1.5'.
>       Perhaps you need to add `SFML' to the build-depends in your .cabal
> file.
>       it is a hidden module in the package `SFML-1.5'
>       Use -v to see a list of the files searched for.
> My cabal file is  http://old.nabble.com/file/p27522604/SFML.cabal here . Il
> you get to know why it doesn't work, please tell me, because I'm lost...
> I have a hs_src directory, which contains an SFML directory (the lib) and a
> demo.hs file. (the simple main)
> It's the way vty-ui package is done.
> Jonathan Daugherty-4 wrote:
>>> Then how does the 'Executable' section of your .cabal look like?
>>> That's what I can't get working.
>>   Executable vty-ui-demo
>>     Hs-Source-Dirs:  src
>>     Main-is:         Demo.hs
>>     Build-Depends:
>>       mtl >= 1.1 && < 1.2
>> The Main-is refers to src/Demo.hs.  This example is from:
>>   http://hackage.haskell.org/packages/archive/vty-ui/0.2/vty-ui.cabal
>> The "package description" link on any Hackage package page will link
>> to the release's cabal file, so you can see how other folks have
>> written their Executable sections.
>> Hope that helps,
>> -- 
>>   Jonathan Daugherty
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list