Am Mittwoch 10 Februar 2010 18:16:42 schrieb Limestraël: > Neil Brown-7 wrote: > > Don't you simply need to do what the error message says, and add (*in > > the Executable section*, at the end of the file): > > Nope, just check my previous message (my issue (2)):
I think http://www.haskell.org/ghc/docs/latest/html/Cabal/authors.html might help, example 3, a package containing a library and executable programs Name: TestPackage Version: 0.0 Cabal-Version: >= 1.2 License: BSD3 Author: Angela Author Synopsis: Package with library and two programs Build-Type: Simple Library Build-Depends: HUnit Exposed-Modules: A, B, C Executable program1 Main-Is: Main.hs Hs-Source-Dirs: prog1 Other-Modules: A, B Executable program2 Main-Is: Main.hs Hs-Source-Dirs: prog2 Other-Modules: A, C, Utils For the executable, you have to specify the source dirs and the modules *from the library you are developing* it needs. A little inconvenient, admittedly. > > Limestrael wrote: > > (2) well, then, when building, if I don't specify that my executable > > depends on my lib, I got: > > SFML/Direct/Graphics.hs:51:7: > > Could not find module `SFML.Direct.Types.Enums': > > It is a member of the hidden package `HSFML-1.5'. > > Perhaps you need to add `HSFML' to the build-depends in your > > .cabal file. > > it is a hidden module in the package `HSFML-1.5' > > Use -v to see a list of the files searched for. > > > > and if I do what it asks me to do (to add the line 'Build-Depends: > > HSFML' in the 'Executable' section of my .cabal file), I'm told when > > 'cabal build'ing: > > cabal: internal error: could not construct a valid install plan. > > The proposed (invalid) plan contained the following problems: > > The following packages are involved in a dependency cycle HSFML-1.5 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe