UnkindPartition / tasty

Modern and extensible testing framework for Haskell
640 stars 110 forks source link

Add field to Result which allows storage of arbitrary data #381

Open Shimuuar opened 1 year ago

Shimuuar commented 1 year ago

This is proposal to add field to Result which allows attaching arbitrary data to it. Change is relatively small so I think it's easier to create PR and discuss concrete code than try to describe and everyone would understand it differently.

This change mostly benefits tasty-bench & tasty-papi which currently sneak data in resultDescription field. But to me it seems generally useful.

Storage is implemented as list of Dynamic. I expect that number of elements would be small (0 or 1) so linear scan is acceptable.