trypurescript
trypurescript copied to clipboard
Support console clear function
submitted at https://github.com/purescript/purescript-console/issues/11
You could provide a shim for console.clear in the TryPureScript module, but it might not do what you think, since the console is cleared on each execution in Try PureScript anyway (if you use withConsole).
@paf31 That's true, however it might come in handy for situations like this:
module Main where
import Prelude
import TryPureScript
import Control.Monad.Eff.Console (log, clear)
main = do
a <- withConsole do
log "foo"
clear
log "bar"
render a
I would expect the above to render only bar, and not foo
I don't know why anybody would use that behavior, but it makes sense for completeness.
If we're going for completeness, we should probably also support warn, info, debug, etc.