ncurses: Modernised bindings to GNU ncurses

[ foreign, gpl, library, user-interfaces ] [ Propose Tags ]

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

Modules

[Last Documentation]

  • UI
    • UI.NCurses
      • UI.NCurses.Panel

Flags

Manual Flags

NameDescriptionDefault
use-pkgconfig

Use pkg-config to set linker and include flags.

Disabled
force-narrow-library

Force including and linking against ncurses instead of ncursesw. This is only useful on systems that have the ncursesw package installed incorrectly. On most systems this will cause compile- or run-time errors.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.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, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16
Dependencies base (>=4.0 && <5.0), containers (>=0.2 && <0.6), text (>=0.7 && <1.3), transformers (>=0.2 && <0.6) [details]
License GPL-3.0-only
Author John Millikin <jmillikin@gmail.com>
Maintainer John Millikin <jmillikin@gmail.com>
Revised Revision 2 made by HerbertValerioRiedel at 2017-01-16T09:10:56Z
Category User Interfaces, Foreign
Home page https://john-millikin.com/software/haskell-ncurses/
Bug tracker mailto:jmillikin@gmail.com
Source repo head: git clone https://john-millikin.com/code/haskell-ncurses/
this: git clone https://john-millikin.com/code/haskell-ncurses/(tag haskell-ncurses_0.2.10)
Uploaded by JohnMillikin at 2014-05-15T21:13:57Z
Distributions
Reverse Dependencies 5 direct, 3 indirect [details]
Downloads 21797 total (79 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-15 [all 7 reports]