terminal/Terminal

type Dim = Types.Dim

type Elm = Types.Graphics.Elm

type EventInfo = Types.Event.EventInfo

type Core = { clone : () -> Core; draw : Dim -> Elm; update : EventInfo -> () }

Simple "core behavior" of an icmt-based service.

type Cached<X> = { equal : X -> Bool; hash : Hash.Hash; clone : () -> Cached<X>; draw : Dim -> Elm; update : EventInfo -> () }

Like Core, but permits indexing and caching based on hashes.

type Terminal = { view : (Types.Dim, [EventInfo]) -> ViewResult; update : ([EventInfo], GfxReq) -> UpdateResult }

type GfxReq = Types.GraphicsRequest

type ViewResult = Types.Graphics.Result

type UpdateResult = [Types.Graphics.Result]

class Basic(initCore : Core)

public func view(dim : Types.Dim, events : [EventInfo]) : ViewResult

public func update(events : [EventInfo], gfxReq : GfxReq) : UpdateResult

Construct Basic terminal service from a service Core.