
13 Jul
2008
13 Jul
'08
3:49 p.m.
Ryan Ingram wrote:
I think you can use the duality of Writer/Reader to help you here; you have the law that, for suitable "dual" computations r and w,
run_reader r (run_writer (w x)) == x
Then you can build up a list of rules specifying which computations are dual; read64 is dual to write64, for example.
OK. This is more or less the approach I ended up taking. Otherwise the QuickCheck properties just reimplement the functions themselves - which doesn't tell you anything! ;-)