Skip to content

Support console clear function #63

Open

Description

@lorezzed

Activity

  1. paf31 commented on Feb 12, 2017

    @paf31
    Contributor

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

  2. Pauan commented on Feb 13, 2017

    @Pauan

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

  3. changed the title [-]support console clear function[/-] [+]Support console clear function[/+] on Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions