TermColor.Terminal.Runtime #
The smallest useful application runtime: typed resize/tick/input events, renderer injection, and
terminal cleanup scoped with finally. Applications may use the lower-level pieces when they need
a custom scheduler or background-job protocol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Scope cursor and alternate-screen state. Both controls restore on failure.
Equations
Instances For
Equations
- TermColor.Terminal.Cancellation.new = do let __do_lift ← liftM Std.CancellationToken.new pure { token := __do_lift }
Instances For
Instances For
Equations
- cancellation.isCancelled = liftM cancellation.token.isCancelled
Instances For
- input (event : Event) : RuntimeEvent
- resize (size : Size) : RuntimeEvent
- tick : RuntimeEvent
Instances For
@[instance_reducible]
Equations
- TermColor.Terminal.instBEqRuntimeEvent.beq (TermColor.Terminal.RuntimeEvent.input a) (TermColor.Terminal.RuntimeEvent.input b) = (a == b)
- TermColor.Terminal.instBEqRuntimeEvent.beq (TermColor.Terminal.RuntimeEvent.resize a) (TermColor.Terminal.RuntimeEvent.resize b) = (a == b)
- TermColor.Terminal.instBEqRuntimeEvent.beq TermColor.Terminal.RuntimeEvent.tick TermColor.Terminal.RuntimeEvent.tick = true
- TermColor.Terminal.instBEqRuntimeEvent.beq x✝¹ x✝ = false
Instances For
@[instance_reducible]
Equations
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.input a) (TermColor.Terminal.RuntimeEvent.input b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.input event) (TermColor.Terminal.RuntimeEvent.resize size) = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.input event) TermColor.Terminal.RuntimeEvent.tick = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.resize size) (TermColor.Terminal.RuntimeEvent.input event) = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.resize a) (TermColor.Terminal.RuntimeEvent.resize b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq (TermColor.Terminal.RuntimeEvent.resize size) TermColor.Terminal.RuntimeEvent.tick = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq TermColor.Terminal.RuntimeEvent.tick (TermColor.Terminal.RuntimeEvent.input event) = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq TermColor.Terminal.RuntimeEvent.tick (TermColor.Terminal.RuntimeEvent.resize size) = isFalse ⋯
- TermColor.Terminal.instDecidableEqRuntimeEvent.decEq TermColor.Terminal.RuntimeEvent.tick TermColor.Terminal.RuntimeEvent.tick = isTrue ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- initial : Model
- fallbackSize : Size
- tickMs : UInt32
- view : ViewContext → Model → Rendered
- update : RuntimeEvent → Model → Model
- isRunning : Model → Bool
- mouse : Bool
Instances For
def
TermColor.Terminal.run
{Model State : Type}
(renderer : Renderer State)
(config : LoopConfig Model)
:
Run a small model/view loop with injectable renderer and guaranteed terminal cleanup.
Equations
- One or more equations did not get rendered due to their size.