I was playing with QuickCheck and I just wanted to put
all of my tests in a list, but that's not possible,
because of the fact that a list can only contain
values of the same type.
So concrete I would like to write down this:
prop_RevRev xs = reverse (reverse xs) == xs
where types = xs::[Int]
See http://www.cwi.nl/~ralf/HList
for a paper which shows how to implement a heterogeneous list in haskell, and
how to implement operations on it (amongst other things)...
Keean.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskel
On Mon, 16 Aug 2004 09:01:45 -0700 (PDT), Ron de Bruijn
<[EMAIL PROTECTED]> wrote:
> I was playing with QuickCheck and I just wanted to put
> all of my tests in a list, but that's not possible,
> because of the fact that a list can only contain
> values of the same type.
>
> So concrete I would li
--- Martin_Sjögren <[EMAIL PROTECTED]> wrote:
> On Mon, 16 Aug 2004 09:01:45 -0700 (PDT), Ron de
> Bruijn
> <[EMAIL PROTECTED]> wrote:
> > I was playing with QuickCheck and I just wanted to
> put
> > all of my tests in a list, but that's not
> possible,
> > because of the fact that a list can onl
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 pr