[Haskell] ANN: vty 1.0: simple terminal interface library

Stefan O'Rear stefanor at cox.net
Mon Dec 18 18:13:44 EST 2006


Announcing vty, a very simple terminal interface library.

In <150 non-blank non-comment lines of Haskell (and 7 lines of C) vty
provides:

* Automatic handling of suspend/resume (SIGTSTP+SIGCONT)
* Automatic handling of window resizes
* Automatic computation of minimal differences
* Minimizes repaint area, thus virtually eliminating the flicker
  problem that plagues ncurses programs
* Automatically decodes keyboard keys into (key,[modifier]) tuples
* Automatically supports refresh on Ctrl-L.
* Automatically supports timeout after 50ms for lone ESC (a barely
  noticable delay)
* Interface is designed for relatively easy compatible extension.

Current disadvantages:
* No current support for non-ANSI terminals.
* Minimal support for special keys on terminals other than the
  linux-console.  (F1-5 and arrow keys should work, but anything
  shifted isn't likely to.)
* Uses the TIOCGWINSZ ioctl to find the current window size, which
  appears to be limited to Linux and *BSD.

darcs get --tag=rel-1.0 http://members.cox.net/stefanor/vty

http://members.cox.net/stefanor/vty/dist/vty-1.0.tar.gz

To compile the demonstration program: ghc --make Test.hs gwinsz.c


More information about the Haskell mailing list