
22 Jul
2010
22 Jul
'10
6:51 a.m.
David Waern wrote:
2010/7/21 Richard O'Keefe
: One of the really nice ideas in the R statistics system is that documentation pages can contain executable examples, and when you wrap up a package for distribution, the system checks that the examples run as advertised.
The next version of Haddock will support something like this, implemented by SImon Hengel.
Here's an example of how to use the new markup:
-- | An example: -- -- ghci> fib 10 -- 55
Awesome. This is similar to Python's thing.
Haskell has a *perfect* fit for this idea in QuickCheck.
We currently only support concrete examples (i.e. unit tests), but the plan is to add support for QuickCheck properties.
Also support SmallCheck/LazySmallCheck, pretty please? :) -- Live well, ~wren