haskell - Can you have an executable and library in the same cabal package -
i'm new using cabal , need bundle include little executable whole library. possible (to export executable , library) or cabal bundle have type
(executable or binary). possible export many executable in same packagke ?
yes can. example, here corresponding excerpt of haskellstarter project, highly recommend:
-- configuration building library library hs-source-dirs: src exposed-modules: haskellstarter.commitprinter other-modules: haskellstarter.util build-depends: base of operations >= 4 && < 5, github >= 0.7.4 && < 0.8 -- configuration executable executable githubcommitprinter hs-source-dirs: executables main-is: main.hs build-depends: base of operations >= 4 && < 5, haskell-starter
notice how library reused in executable dependencies.
haskell cabal
No comments:
Post a Comment