Skip to content

`CallStack` documentation in `libraries/base/GHC/Stack/Types.hs` is inaccurate

Summary

In commit 7407a66d, GHC's CallStack implementation was modified to never infer HasCallStack constraints. The documentation in the user's guide was updated, but the documentation in libraries/base/GHC/Stack/Types.hs was not.

Proposed improvements or changes

A patch to follow will address the following issues in Types.hs:

  • change the documentation of HasCallStack solving to match the correct version in the user's guide
  • remove documentation of the CallStack's internal representation in favor of a pointer to the getCallStack function, also based on the explanation in the user's guide
  • delete a spurious note about the ?callStack implicit parameter being an implementation detail, as it's already documented elsewhere in the module
  • add a bit of detail to getCallStack to explain what the String and SrcLoc are (as it's explained in the user's guide reference to getCallStack).
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information