The ncurses package

[Tags: gpl, library]

GNU ncurses is a library for creating command-line application with pseudo-graphical interfaces. This package is a nice, modern binding to GNU ncurses.

The following example is a program that display the message "Hello world!" until the user hits Q:

import UI.NCurses

main :: IO ()
main = runCurses $ do
    setEcho False
    w <- defaultWindow
    updateWindow w $ do
        moveCursor 1 10
        drawString "Hello world!"
        moveCursor 3 10
        drawString "(press q to quit)"
        moveCursor 0 0
    render
    waitFor w (\ev -> ev == EventCharacter 'q' || ev == EventCharacter 'Q')

waitFor :: Window -> (Event -> Bool) -> Curses ()
waitFor w p = loop where
    loop = do
        ev <- getEvent w Nothing
        case ev of
            Nothing -> loop
            Just ev' -> if p ev' then return () else loop

Properties

Versions0.1, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10
Dependenciesbase (>=4.0 && <5.0), containers (>=0.2), text (>=0.7), transformers (>=0.2)
LicenseGPL-3
AuthorJohn Millikin <jmillikin@gmail.com>
MaintainerJohn Millikin <jmillikin@gmail.com>
Stabilityexperimental
CategoryUser Interfaces, Foreign
Home pagehttps://john-millikin.com/software/haskell-ncurses/
Bug trackermailto:jmillikin@gmail.com
Source repositoryhead: git clone https://john-millikin.com/code/haskell-ncurses/
this: git clone https://john-millikin.com/code/haskell-ncurses/(tag haskell-ncurses_0.2.6)
Upload dateWed Sep 18 02:30:58 UTC 2013
Uploaded byJohnMillikin
DistributionsDebian:0.2.7, NixOS:0.2.10
Downloads1430 total (151 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees