[Haskell-cafe] Cabal, lib and exe in one

Magnus Therning magnus at therning.org
Tue May 1 04:34:04 EDT 2007


I'm trying to create a single cabal file containing specs for both a
library and an executable using that library.  I'm not having much luck
though :(

This is what I have so far:

  name: foo
  version: 0.1
  exposed-modules: Foo.Bar
  other-modules: Foo.Qux Foo.C2HS
  hs-source-dirs: src
  include-dirs: csrc
  c-sources: csrc/qux.c
  extensions: ForeignFunctionInterface
  build-depends: base, haskell98
  
  executable: foo
  hs-source-dirs: test-src
  main-is: foo.hs
  other-modules: Foo.Bar

When built this is the message I get:
  test-src/foo.hs:5:7:
      Could not find module `Foo.Bar':
        Use -v to see a list of the files searched for.

How do I specify that Foo.Bar is found where cabal puts it
(./dist/build/)?

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus at therning.org             Jabber: magnus.therning at gmail.com
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Finagle's Fifth Law:
Always draw your curves, then plot your readings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070501/ee2a831c/attachment.bin


More information about the Haskell-Cafe mailing list