Tiny, declarative wrapper around ncurses

Latest on Hackage:0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

GPL-3 licensed by Philipp Middendorf

SneakyTerm gives you MonadTerminal which gives you two operations, tmRender to render a list of tiles, and tmCharEvent to wait for character input. A simple example:

main = do
  let viewport = rectFromOriginAndDim (V2 0 0) (V2 80 25)
  runTerminal viewport $ do
    tmRender [Tile (V2 10 10) '@' (ColorPair Red Blue)]
    _ <- tmCharEvent
    return ()

This will render a red @ at column 11, line 11, with blue background.

Used by 1 package:
comments powered byDisqus