[Haskell-cafe] Custom QuickCheck Gens without custom shrinks

2012-08-15 Thread Niklas Hambüchen
I wrote this Gen to generate lines of texts without \NUL and \n: fullLinesProp = forAll linesGen ... linesGen = listOf . listOf $ arbitrary `suchThat` (`notElem` ['\NUL', '\n']) -- alternatively: linesGen = arbitrary `suchThat` (all (all (`notElem` ['\NUL', '\n']))) However, I

Re: [Haskell-cafe] Custom QuickCheck Gens without custom shrinks

2012-08-15 Thread Niklas Hambüchen
Oh, this is silly. Of course it is: forAllShrink linesGen shrink ... On 15/08/12 20:35, Niklas Hambüchen wrote: I wrote this Gen to generate lines of texts without \NUL and \n: fullLinesProp = forAll linesGen ... linesGen = listOf . listOf $ arbitrary `suchThat` (`notElem`