Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support console clear function #63

Open
lorezzed opened this issue Feb 12, 2017 · 2 comments
Open

Support console clear function #63

lorezzed opened this issue Feb 12, 2017 · 2 comments

Comments

@lorezzed
Copy link

submitted at purescript/purescript-console#11

@paf31
Copy link
Contributor

paf31 commented Feb 12, 2017

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).

@Pauan
Copy link

Pauan commented Feb 13, 2017

@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.

@paf31 paf31 changed the title support console clear function Support console clear function Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants