haskell / play-haskell

Haskell Playground
129 stars 8 forks source link

make error message in playground clickable #51

Closed MangoIV closed 1 month ago

MangoIV commented 2 months ago

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.

tomsmeding commented 2 months ago

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 commented 1 month ago

Let me know if this looks good :)

MangoIV commented 1 month ago

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