Also available on Hackage.
Low-level Haskell bindings to the BearLibTerminal graphics library, primarily for roguelike games.
The design overview of the original library is excellent to get an understanding of how things work: http://foo.wyrd.name/en:bearlibterminal:design.
- This library assumes you have built the main BearLibTerminallibrary (or downloaded the precompiled binaries available from http://foo.wyrd.name/en:bearlibterminal) and your build tool can find it (e.g. by settingLD_LIBRARY_PATHorDYLD_LIBRARY_PATH).
- Add bearlibterminalto your*.cabalbuild-depends.
- Enjoy.
This is pretty much a 1-to-1 mapping of the original BLT API, with some marshalling of types and wrappers around function calls that take C strings (these are offered in CString, Text, and String flavours).
Every API call is available as both a raw FFI call (c_terminal_snake_case) and as a monadic MonadIO m => ... m a function.
Other notes:
- Colours are still simply 4-byte Ints. Higher level colour functions are available inroguefunctor.
- terminalCompositiontakes a- TerminalCompositionModerather than raw integers.
- Events read by terminal_peek,terminal_readare returned as raw integers (terminalPeekCode) and asKeycodes (terminalPeek).
Check out the Haskell roguelike toolkit library roguefunctor, which is the high-level, opinionated wrapper around this library with nicer abstractions for positions, colours, config options, event handling, rendering, and so forth.

