Usability of System.Posix.Terminal

Stefan O'Rear stefanor at cox.net
Sun Mar 18 02:06:42 EDT 2007


On Sat, Mar 17, 2007 at 10:50:36PM -0700, David Brown wrote:
> I was wondering if there are any applications that make use of
> System.Posix.Terminal?  I'm trying to write some code to communicate
> over a serial port, and am trying to figure out how these functions
> are intended to be used.

My 'vty' library (a curses-a-like) uses System.Posix.Terminal to set
no-echo mode:

darcs get http://members.cox.net/stefanor/vty

> There are a bunch of 'with...' and 'without...' functions, but I'm not
> sure how to easily combine them to modify some terminal attributes.
> The best I've come up with is:
> 
>   flip withoutMode IgnoreBreak .
>   flip withoutMode InterruptOnBreak .
>   flip withMode LocalMode .
>   flip withInputSpeed B9600 $ originalMode
> 
> and so on.  Am I missing something here?

No.

Stefan


More information about the Libraries mailing list