You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
paf31 commentedon Feb 12, 2017
You could provide a shim for
console.clearin theTryPureScriptmodule, but it might not do what you think, since the console is cleared on each execution in Try PureScript anyway (if you usewithConsole).Pauan commentedon Feb 13, 2017
@paf31 That's true, however it might come in handy for situations like this:
I would expect the above to render only
bar, and notfooI 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.[-]support console clear function[/-][+]Support console clear function[/+]