Thanks all for the responses. I managed to put them all together and I [got it all to work](https://github.com/AmpersandTarski/Ampersand/blob/cefbc08ad8fb3152ce1a55dce5f6334cfc732d46/src/Ampersand/Test/Parser/QuickChecks.hs). 

Cheers,
Han. 

Op za 12 jun. 2021 om 13:28 schreef Henning Thielemann <lemming@henning-thielemann.de>:

On Sat, 12 Jun 2021, Han Joosten wrote:

> Thanks for this respons, Rubén. I might not have explained what I am looking for very well. I already have 
> instance Arbitrary Foo 
> That is not the problem. The problem is, that when a counterexample is found, it is dumped to the output with the `show` function.
> I would like to be able to use another function for that, say show'. In order to do so, I need to obtain the counterexample itself
> in some way, so I can use it to generate a useful message after the tests are done. 

https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/Test-QuickCheck.html#v:forAllShow