>7^      Safe-Inferred The blocking  function takes one additional argument, the timeout (since it cannot continue executing commands in parallel while one command freezes).xWrapping commands is identical to the non-blocking version except that there is no predicate to recognize return values.timeout (in ms)'The end of line character for this portThe command to sendThe serial port to access if there was a timeout, other  and the response string Safe-Inferred% takes produces a structure around a  to | handle multiple callers to the serial port. The return value is | the channel to which all commands will flow. Users should use | the K function to access it instead of trying to | access its details directly.tHaving multiple serial managers running on the same port is a disaster waiting to happen. When you're done with a , run  on it to shut it down.All the commands to operate a  should be specializations of v, created by applying it to the first three arguments, then using that thereafter as the command to the serial port.HFor example, the Olympus IX-81 requires a login command from the user (2LOG IN) followed by rn+ as an end of line. The response will be 2LOG + followed by r&. So a login command would look like p = ("2LOG" `isPrefixOf`) *login mgr = wrapCommand "\r\n" "2LOG IN" p uses functions of type 'String -> Bool' users can choose whether or not to match any given command based upon its contents, rather than just blindly saying whether it matches or not. `Some commands don't expect any response from the hardware on the far end. For these cases, use  . Sometimes we don't want the current thread to block, but we still want some action when the a command returns from the serial port. To that end,  s lets us pass a function of type 'String -> IO ()' to be executed when a response is recognized by the predicate. !"#$%&'the handle to wrap:the termination string for commands received from the port3the termination string for command send to the port()*+The command to send.The predicate to recognize the returning valueThe serial port to accessThe response from the port The command to sendThe serial port to access The command to send.The predicate to recognize the returning value,The callback to run when the command returnsThe serial port to access/The thread id in which the command is being run    "!#$%#&'()*+  Safe-InferredSerial lets the user set the number of stop bits, the parity, flow control (there is no hardware flow control, since it isn't supported in the System.Posix.IO[ library), number of bits per byte, and the baud rate. The baud rate is declared by the , in System.Posix.Terminal. , , and   are defined here. opens the serial port and sets the options the user passes, makes its buffering line oriented, and returns the handle to control it. For example, an Olympus IX-81 microscope attached to the first serial port on Linux would be opened with 2openSerial "/dev/ttyS0" B19200 8 One Even Software -)The filename of the serial port, such as devttyS0(The number of bits per word, typically 8Almost always One# unless you're talking to a printer./01o23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,    -./01      !"#$% &'()*+,-./012345.67.68.69.6:./;./<./=./>./?./@./A./B./C./D./E./F./G./H./I./J./K./L./M./N./O./P./Q./R./S./T./U./V./W./X./Y./Z./[./\./]./^./_./`./a./b./c./d./e./f./g./h./i./j./k./l./m./n./o./p./q./r./s./t./u./v./w./x./y./z./{./|./}./~./././././././././././././././././././././././././././ serial-0.2.7System.Serial.BlockingManagerSystem.Serial.Manager System.SerialBlockingSerialManagerBlockingSerialCommand serialManager wrapCommand SerialManager SerialCommandcloseSerialManagerwrapDeafCommandwrapCommandWithCallback FlowControl NoFlowControlSoftwareParityNoParityOddEvenStopBitsTwoOne openSerialprocessbase Data.MaybeNothingJustGHC.IO.Handle.TypesHandle managedHandlestorageinputTerminatoroutputTerminatorportMonitorThread SerialMemory DeafCommandcmd predicate returnPtrisDeaftoMemory isolateWhere portWatcher takeUntil unix-2.7.0.1System.Posix.Terminal.CommonBaudRate setSerial withParitywithFlowControl withStopBitsconfigureSettingsSystem.Posix.TerminalopenPseudoTerminalgetSlaveTerminalNamegetControllingTerminalNamegetTerminalName queryTerminalsetTerminalProcessGroupIDgetTerminalProcessGroupID controlFlow discardData drainOutput sendBreaksetTerminalAttributesgetTerminalAttributeswithOutputSpeed outputSpeedwithInputSpeed inputSpeed withMinInputminInputwithTime inputTime withoutCCwithCC controlCharwithBits bitsPerByte terminalModewithMode withoutModeTerminalAttributesInterruptOnBreak MapCRtoLF IgnoreBreakIgnoreCRIgnoreParityErrors MapLFtoCR CheckParity StripHighBitStartStopInputStartStopOutputMarkParityErrors ProcessOutput LocalMode ReadEnable TwoStopBits HangupOnClose EnableParity OddParity EnableEcho EchoEraseEchoKillEchoLF ProcessInputExtendedFunctionsKeyboardInterruptsNoFlushOnInterruptBackgroundWriteInterrupt TerminalMode EndOfFile EndOfLineErase InterruptKillQuitStartStopSuspendControlCharacterB0B50B75B110B134B150B200B300B600B1200B1800B2400B4800B9600B19200B38400B57600B115200 Immediately WhenDrained WhenFlushed TerminalState InputQueue OutputQueue BothQueues QueueSelector SuspendOutput RestartOutput TransmitStop TransmitStart FlowAction