
10 Aug
2009
10 Aug
'09
12:15 a.m.
John D. Ramsdell wrote:
Usually I include the example program in the package, but make its compilation conditional using a Cabal flag like buildExamples.
But then the binaries generated from the example program get installed. I think the poster wants to share the source code, not install a demo.
But only if the flag is set. The user can simply look at the source code example without installing the program. Another option: test code (or any other source) can easily be included in the source dist by adding them to the "extra-source-files:" line in the .cabal file. I include tests in the pureMD5 package in this manner. Thomas