[Haskell-cafe] [Haskell Cafe] ASCII Graphics Library wanted
bugfact at gmail.com
Sun Aug 30 18:06:56 EDT 2009
As mentioned in a previous thread that you might have missed, in case you're
on Windows, and you want to use unbuffered raw keyboard input, this is
But a quick workaround is to wrap the DOS/Windows conio functions, like
-- | Read the next character from the console's input queue.
-- This is a blocking operation if no key is queued.
getCh :: IO Char
getCh = fmap (toEnum.fromIntegral) c_getch
foreign import ccall unsafe "conio.h getch" c_getch :: IO CInt
-- | Check if at least one key is queued.
kbHit :: IO Bool
kbHit = fmap (/=0) c_kbhit
foreign import ccall unsafe "conio.h kbhit" c_kbhit :: IO CInt
On Sun, Aug 30, 2009 at 4:42 PM, Paul Sujkov <psujkov at gmail.com> wrote:
> Hi Peter,
> yes, this seems like what I actually want. Thank you :)
> 2009/8/30 Peter Verswyvelen <bugfact at gmail.com>
> Maybe this can help?
>> On Sun, Aug 30, 2009 at 4:24 PM, Paul Sujkov <psujkov at gmail.com> wrote:
>>> is there any (by any means) portable ASCII-Graphics library for Haskell,
>>> such as NCurses or AALib? I see HaHa library on Hackage, but is it the only
>>> existing library for such a purpose (version 0.2 alerts me a bit)? Or maybe
>>> someone has any experience in developing some rogue-like gams in Haskell? :)
>>> Regards, Paul Sujkov
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
> Regards, Paul Sujkov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe