ANSI hyperlink escapes on error codes
Motivation
Today, users may not know what to do with Haskell error codes. If the user interface can lead users to documentation more directly, that could be useful.
Proposal
Many terminal emulators today support an escape sequence for decorating text as a hyperlink. This includes terminals based on VTE (such as GNOME Terminal and Console), iTerm2 on macOS, Konsole, and others. This feature is also supported in various Haskell applications, such as Matterhorn. It gracefully degrades on terminals that don't implement this escape sequence.
I propose that GHC error codes GHC-ABCDE be printed to terminals as links to https://errors.haskell.org/messages/GHC-ABCDE.
It would additionally be nice to link from documentation references in error messages to the corresponding section of the User's Guide, but that seems to be something that would require a good bit more work.
GHCup already does this. The code in GHCup that implements this for error codes is here:
and here: