Attach arbitrary data to CallStack
Sometimes I would love to have a function
pushCallStackAnnotation :: String -> CallStack -> CallStack
that pushes arbitrary extra information to the CallStack
(e.g. the value of some parameter).
The impact would be some breaking changes around CallStack
(because it wouldn’t be a [(String, SrcLoc)]
anymore), and in a way it’s a dangerous feature, because if overused it might cause programs to keep more data alive than expected. But in some cases it could really help with debugging, I expect.