Reputation: 21817
I have simple program written with haskell, i build it with cabal. For example i my program has next directory structure:
my-prog
* Main.hs
* my-prog.cabal
* SomeDirWithHsFiles
- File1.hs
- File2.hs
I want that when i'll make cabal build and cabal install (maybe something else), SomeDirWithHsFiles
with *.hs files, installed like a normal haskell library, and then i'll use File1.hs
and File2.hs
modules in other programm.
How can i do this?
Thank you.
Upvotes: 0
Views: 78
Reputation: 137937
You need to declare your additional files in a library
section, like so:
library
exposed-modules: File1
File2
executable foo
main-is: Main.hs
See for example, xmonad's .cabal file.
Upvotes: 1