[Haskell-cafe] Character I/O

Andrew Coppin andrewcoppin at btinternet.com
Tue Mar 31 17:11:41 EDT 2009


Judah Jacobson wrote:
> Sounds like you're on Windows, so it's probably this bug:
>
> http://hackage.haskell.org/trac/ghc/ticket/2189
>   

I am on Windows. It looks like my programs are running editline or 
something to give a command history. Ordinarily that would actually be 
quite useful, but for this particular application, not so much.

> Although: if you're trying to get at the arrow keys from the Windows
> cmd console, it's not possible by reading stdin; rather, you need to
> access the lower-level Win32 console APIs:
>
> http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx
>
> Not sure if it will help, but you could take a look at what I did in Haskeline:
>
> http://code.haskell.org/haskeline/System/Console/Haskeline/Backend/Win32.hsc
>   

All useful ideas. I'll give that a shot...



More information about the Haskell-Cafe mailing list