[Haskell-cafe] Examples

Mark Wotton mwotton at gmail.com
Sun Aug 9 21:11:04 EDT 2009


On 10/08/2009, at 9:29 AM, 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.
>
> I haven't figure out a way to specify test programs that don't get
> installed, but are only intended to be built and run within the
> context of a source distribution.

Couldn't resist a chance to spruik TBC (Testing By Convention) <http://hackage.haskell.org/package/TBC 
 > - it's a framework Pete Gammie and I are developing to run tests in  
Haskell.

In addition to a few other neat features like not having to write  
boilerplate main functions by way of some conventions about how to run  
tests, it knows enough about Cabal to use the package information etc  
to link your tests together, and provides a command line tool (tbc) to  
run your tests and provide a report.

If you use it and it's helpful to you, or you have any suggestions for  
how it could be improved, please let me or Pete know.

Cheers
Mark


More information about the Haskell-Cafe mailing list