haskell/play-haskell

make error message in playground clickable

Closed this issue · 3 comments

Feature request

It would be nice, if in play-index.ts, response.ghcout, we would search an replace every occurrence of a regex

\[GHC-\d{6}\]

with the link:

<a href=https://errors.haskell.org/messages/GHC-<the-error-code>/

Then we would have clickable errors in the output.

I checked what happens if you put an undocumented error code and errors.haskell.org is actually quite helpful in this case, so this should be quite nice.

This is quite a nice idea, and should be easy to implement. Currently AFK for a while, but I'll try to get to it in a few weeks.

I guess the links should be target=_blank as well.

Let me know if this looks good :)

It’s awesome. Thank you so much for taking time to implement this! ❤️