Skip to content

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information