haskell / haskell/error-messages

Make it simpler to identify that the RTS is causing an error

Open
#548 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

When debugging an error it is very important to identify the "speaker" who emitted the error message.
For example, I recently had to figure out which tool causes the following error on the command line:
```
Hpc failure: module mismatch with .tix/.mix file hash number
(perhaps remove Example.tix file?)
```
After some search it turned out that the the error originates from the GHC runtime system. Errors coming from GHC are already easily identifiable by the `[GHC-XXXX]` prefix, stack and ghcup have implemented the same convention, and cabal will soon follow suit in [version 3.12](https://github.com/haskell/cabal/issues/8543#issuecomment-1703860969).

I don't think it is necessary to go to the great lengths as the structured error message proposal for GHC, but maybe it would be possible to go through the C code of the RTS and make sure that every error message emitted by the RTS identifies itself as such, maybe by a prefix like `[GHC-RTS]` or something like that.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.