I want to implement a roundtrip test for a parser/prettyprinter combination. Let me try to explain what I am struggling with. I start with some type definitions of functions I have
parseFoo :: Text -> Guarded Foo
prettyFoo :: Foo -> Text
The idea is that for all foo :: Foo, the following holds:
parseFoo . prettyFoo $ foo should be equal to Checked foo []
Now, if there is a counterexample, I would like to see prettyFoo foo as output, folowed by the show of the Errors part.
I have been struggling to get this working, but without luck so far. I am not very familiar with Quickcheck, so that could be the problem too.
Any help would be appreciated!
Thanks
Han