Module

Marionette.Renderers.Eventless

Package
purescript-marionette-commander
Repository
thought2/purescript-marionette-commander

The 'eventless' renderer is a trivial renderer. In prints the stringified state to the console and does not handle any user input.

#Config Source

type Config = { clearScreen :: Boolean }

Main configuration options for the eventless renderer

  • clearScreen defines weather the terminal screen should be cleared before each render. If not, subsequent views are rendered in below each other in the terminal.

#View Source

type View sta = sta -> String

The actual high level view function that the user will provide

#defaultConfig Source

defaultConfig :: Config

Some defaults for the Config type

#mkRenderer Source

mkRenderer :: forall sta msg. Config -> View sta -> Renderer msg sta

Creates an eventless renderer with configuration

#mkRenderer_ Source

mkRenderer_ :: forall sta msg. View sta -> Renderer msg sta

Creates an eventless renderer