Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 608 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 608 Bytes

lean4-terminal

WIP: event feature not finished.

A Lean package for programming the terminal.

This pacakge is mostly "translated" from Rust's crossterm.

Example

import Terminal

open Terminal

def main : IO Unit := do
  queue #[
    Terminal.SetBackgroundColor.mk Color.red
  ]
  IO.println "Hello, world"

Limitations

  • stdout only, until IO primitives for Lean 4 is more usable.
  • ANSI only (Win 10 and *nix). Adding support for legacy systems is important, but not our focus now.
  • poll unavailable, lacking of async IO in Lean 4.