Hello,

I want to use cabal to build and install shared library, which will be called from C. I've already found necessary combination of flags and options to successfully build it, but now I have two main issues:

1) The library is installed into "bin".
2) The generated "stub" C headers are not installed at all.

How can I resolve this? My current options is as follows:

executable libtest.so
  hs-source-dirs:      src
  main-is:             Test.hs
  default-language:    Haskell2010
  default-extensions:  ForeignFunctionInterface
  build-depends:       base >= 4.7
  c-sources:           cbits/library_init.c
  ghc-options:         -no-hs-main -shared -dynamic
  cc-options:          -DMODULE=Test -fPIC


Thanks for any help and have a nice day,
Nikolay.