[Haskell-cafe] Type System vs Test Driven Development

Chung-chieh Shan ccshan at post.harvard.edu
Thu Jan 6 04:31:32 CET 2011


Evan Laforge <qdunkan at gmail.com> wrote in article <AANLkTinfYp-bpbS1GA8_=o9WcrHe+duuX-vFrmDL29hJ at mail.gmail.com> in gmane.comp.lang.haskell.cafe:
> Incidentally, I've never been able to figure out how to use
> QuickCheck.  Maybe it has more to do with my particular app, but
> QuickCheck seems to expect simple input data and simple properties
> that should hold relating the input and output, and in my experience
> that's almost never true.  For instance, I want to ascertain that a
> function is true for "compatible" signals and false for "incompatible"
> ones, where the definition of compatible is quirky and complex.  I can
> make quickcheck generate lots of random signals, but to make sure the
> "compatible" is right means reimplementing the "compatible" function.
> Or I just pick a few example inputs and expected outputs.

Besides those example inputs and expected outputs, what about:
If two signals are (in)compatible then after applying some simple
transformations to both they remain (in)compatible?  A certain family of
signals is always compatible with another family of signals?  Silence is
compatible with every signal?  Every non-silent signal is (in)compatible
with itself (perhaps after applying a transformation)?

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
<INSERT PARTISAN STATEMENT HERE>




More information about the Haskell-Cafe mailing list