The biggest problem isn't what others have said. The biggest problem is that the try box doesn't let you define your own functions or variables.
Therefore, even if you were an old hand at GHC and GHCi and so on, you'd still be unable to run the code it shows at the top of the page.
This is probably bad website design. Especially since the website still lets randoms burn themselves by entering non-terminating code that makes their browsers slow.
> I agree with the problems but am curious how you would solve the non-terminating code problem?
I thought it was running on the browser, based on what the OP said, so that would entail opcode-counting or, if you can use multiple threads, watchdog timers. That is, don't try to solve the halting problem, just enforce an arbitrary limit to how long code can run.
However, if the code is being run on the server, you could enforce CPU and RAM quotas to do the same thing with the OS's help.
Therefore, even if you were an old hand at GHC and GHCi and so on, you'd still be unable to run the code it shows at the top of the page.
This is probably bad website design. Especially since the website still lets randoms burn themselves by entering non-terminating code that makes their browsers slow.