diff options
Diffstat (limited to 'lambda-calcul/haskell')
| -rw-r--r-- | lambda-calcul/haskell/public/repl.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lambda-calcul/haskell/public/repl.js b/lambda-calcul/haskell/public/repl.js index 27b4ba2..1d1db87 100644 --- a/lambda-calcul/haskell/public/repl.js +++ b/lambda-calcul/haskell/public/repl.js @@ -103,11 +103,19 @@ function readMessageAndAppend(reader) { }; }; +function clearOutput() { + const outputs = document.querySelectorAll('div#minilang > div.output'); + + outputs.forEach((node) => node.remove()); +}; + function makeCommand(val) { const words = val.split(/ +/); if(words[0] === ":env") { return {tag:"Com",contents:{tag:"DumpEnv"}}; } else if(words[0] === ":clear") { + // FIXME: this is gross + clearOutput(); return {tag:"Com",contents:{tag:"ClearEnv"}}; } else if(words[0] === ":help") { return {tag:"Com",contents:{tag:"Help"}}; |
