[haskeline] #114: does not play well with minTTY on windows

haskeline haskeline at projects.haskell.org
Thu Sep 29 17:02:12 BST 2011

#114: does not play well with minTTY on windows
Reporter:  malcolmw  |       Owner:     
    Type:  defect    |      Status:  new
Priority:  minor     |   Milestone:     
 Version:            |    Keywords:     
 Haskeline, at least when baked into a Windows-native build of ghc, appears
 not to work well with the minTTY terminal emulator.  Neither the arrow
 keys, nor vi key bindings do anything useful - they simply corrupt the
 buffer being passed to the underlying program by adding odd non-printable

 I think the cause is similar to the reason that Windows-native Python does
 not work interactively in minTTY without special options.  To quote

 "This is due to MinTTY being based on Cygwin pty's, which do not play well
 with Windows console apps. [...] basically it's because the pty emulation
 is based on pipes, which means that a Win32 application running in MinTTY
 sees a pipe rather than a console as its input, so it behaves

 For instance, the _isatty() call will return False when run inside minTTY.
 The webpage goes into some more details, but I think the main problem is
 that Windows-native (rather than Cygwin) programs have no API available to
 them to manipulate a "pseudo terminal".

 I'm not certain the issue is fixable in Haskeline, but thought it worth
 noting, even if only for googleability.

Ticket URL: <http://trac.haskell.org/haskeline/ticket/114>
haskeline <http://example.org/>
My example project

More information about the Haskeline mailing list