Ron de Bruijn wrote:
--- Martin_Sjögren <[EMAIL PROTECTED]> wrote:
[...]
mapM_ quickCheck [Test prop_revrev, Test prop_trivial, Test prop_something]
Regards, Martin
I didn't expect these replies (including one mentioning the HList idea(the enforced ordening is nice, though)), while I tried to be precise. The idea is that you don't write down the Test constructor in any place, because you(that's the compiler) can check that all the values you put in the list(or any other datastructure) belong to a certain class. Everything that can be derived should be derived.
(The following is adapted from a message in a previous thread, but I forget whose it was.)
If you only wanted to minimise the number of tokens, you could rewrite
test = quickCheck a >> quickCheck b >> quickCheck c
as
m & p = m >> quickCheck p -- reusable test = quickCheck a & b & c
which is about as succinct as the list notation.
Regards, Tom
_______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe