UnkindPartition / tasty

Modern and extensible testing framework for Haskell
637 stars 108 forks source link

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

Open Shimuuar opened 12 months ago

Shimuuar commented 12 months 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.