play-haskell icon indicating copy to clipboard operation
play-haskell copied to clipboard

make error message in playground clickable

Open MangoIV opened this issue 1 year ago • 1 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.

MangoIV avatar Aug 14 '24 19:08 MangoIV

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.

tomsmeding avatar Aug 14 '24 21:08 tomsmeding

Let me know if this looks good :)

tomsmeding avatar Sep 01 '24 09:09 tomsmeding

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

MangoIV avatar Sep 01 '24 09:09 MangoIV