! b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     (SafeXvty~Converts an array of ISO-10646 characters (Char type) to an array of Word8 bytes that is the corresponding UTF8 byte sequence None$X7@ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]!NoneX ^vtycapability evaluator state_NoneX&vtybReturns the display width of a character. Assumes all characters with unknown widths are 0 width.vty_Returns the display width of a string. Assumes all characters with unknown widths are 0 width.vty]Returns the display width of a text. Assumes all characters with unknown widths are 0 width.vtybReturns the display width of a lazy text. Assumes all characters with unknown widths are 0 width."SafeX)vty5Create a value in the Color240 set from an RGB triple vty5Create a RGB triple from a value in the Color240 set. Safe79XD vty(Abstract data type representing a color.SCurrently the foreground and background color are specified as points in either a:16 color palette. Where the first 8 colors are equal to the 8 colors of the ISO 6429 (ANSI) 8 color palette and the second 8 colors are bright/vivid versions of the first 8 colors.240 color palette. This palette is a regular sampling of the full RGB colorspace for the first 224 colors. The remaining 16 colors is a greyscale palette.,The 8 ISO 6429 (ANSI) colors are as follows: blackredgreenyellowbluemagentacyanwhiteCThe mapping from points in the 240 color palette to colors actually displayable by the terminal depends on the number of colors the terminal claims to support. Which is usually determined by the terminfo "colors" property. If this property is not being accurately reported then the color reproduction will be incorrect.If the terminal reports <= 16 colors then the 240 color palette points are only mapped to the 8 color pallete. I'm not sure of the RGB points for the "bright" colors which is why they are not addressable via the 240 color palette.If the terminal reports > 16 colors then the 240 color palette points are mapped to the nearest points in a ("color count" - 16) subsampling of the 240 color palette.All of this assumes the terminals are behaving similarly to xterm and rxvt when handling colors. And that the individual colors have not been remapped by the user. There may be a way to verify this through terminfo but I don't know it.,Seriously, terminal color support is INSANE.vty Create a Vty   (in the 240 color set) from an RGB triple. This function is lossy in the sense that we only internally support 240 colors but the #RRGGBB format supports 16^3 colors.   Safe &'179SXA#vtyStyles are represented as an 8 bit word. Each bit in the word is 1 if the style attribute assigned to that bit should be applied and 0 if the style attribute should not be applied.$vtyThe style and color attributes can either be the terminal defaults. Or be equivalent to the previously applied style. Or be a specific value.(vtySpecifies the display attributes such that the final style and color values do not depend on the previously applied display attribute. The display attributes can still depend on the terminal's default colors (unfortunately)..vtyoA display attribute defines the Color and Style of all the characters rendered after the attribute is applied.At most 256 colors, picked from a 240 and 16 color palette, are possible for the background and foreground. The 240 colors and 16 colors are points in different palettes. See Color for more information.4vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)5vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)6vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)7vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)8vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)9vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.):vty The 7 possible style attributes:standout underline reverseVideoblinkdim bold/brightitalico(The invisible, protect, and altcharset display attributes some terminals support are not supported via VTY.)=vty:true if the given Style value has the specified Style set.>vtySet the foreground color of an ..?vtySet the background color of an ..@vtyAdd the given style attributeAvty)Add a hyperlinked URL using the proposed  Bhttps://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda'escape sequences for hyperlinked URLs. These escape sequences are comparatively new and aren't widely supported in terminal emulators yet, but most terminal emulators that don't know about these sequences will ignore these sequences, and therefore this should fall back sensibly. In some cases they won't and this will result in garbage, so this is why hyperlinking is disabled by default, in which case this combinator has no observable effect. To enable it, enable  Hyperlink$ mode on your Vty output interface.BvtySets the style, background color and foreground color to the default values for the terminal. There is no easy way to determine what the default background and foreground colors are.CvtyKeeps the style, background color and foreground color that was previously set. Used to override some part of the previous style.EG: current_style > brightMagentavWould be the currently applied style (be it underline, bold, etc) but with the foreground color set to brightMagenta.7 #$%&'()*+,-./0123456789:;<=>?@ABC!./0123()*+,-$%&'BC#@4:56789;<=>?ASafeX9WvtygStyle attribute changes are transformed into a sequence of apply/removes of the individual attributes.fvty7Difference between two display color attribute changes.jvtydifference between two display attributes. Used in the calculation of the operations required to go from one display attribute to the next.Previously, vty would reset display attributes to default then apply the new display attributes. This turned out to be very expensive: A *lot* more data would be sent to the terminal than required.pvtyGiven the previously applied display attributes as a FixedAttr and the current display attributes as an Attr produces a FixedAttr that represents the current display attributes. This is done by using the previously applied display attributes to remove the  KeepCurrent abstraction.qvty:Used in the computation of a final style attribute change.rvtyhConsider two display color attributes diffs. What display color attribute diff are these equivalent to?svtyiConsider two URL changes, which are mostly going to be the latter unless the latter specifies no change.tvtyDetermines the diff between two display&color attributes. This diff determines the operations that actually get output to the terminal.%SVTUWedcba`_^]\[ZYXfghijkonmlpqrstuvw%pjkonmlqrsfghiWedcba`_^]\[ZYXSVTUtuvwSafeXsvty'The type of exceptions specific to vty.ZThese have fully qualified names by default since, IMO, exception handling requires this.vty&Uncategorized failure specific to vty.#None$7X6vtyHThis is the internal representation of Images. Use the constructors in Graphics.Vty.Image to create instances. Images are:a horizontal span of text+a horizontal or vertical join of two imagesa two dimensional fill of the Pictures background charactera cropped image%an empty image of no size or content.`vty-A horizontal text span has a row height of 1.avtyA horizontal join can be constructed between any two images. However a HorizJoin instance is required to be between two images of equal height. The horizJoin constructor adds background fills to the provided images that assure this is true for the HorizJoin value produced.bvtyA veritical join can be constructed between any two images. However a VertJoin instance is required to be between two images of equal width. The vertJoin constructor adds background fills to the provides images that assure this is true for the VertJoin value produced.cvtyA background fill will be filled with the background char. The background char is defined as a property of the Picture this Image is used to form.dvtyJCrop an image horizontally to a size by reducing the size from the right.evtyICrop an image horizontally to a size by reducing the size from the left.fvtyHCrop an image vertically to a size by reducing the size from the bottomgvtyECrop an image vertically to a size by reducing the size from the tophvtyThe empty image7The combining operators identity constant. EmptyImage  | a = a EmptyImage  - a = a.Any image of zero size equals the empty image.ivtyJThe text to display. The display width of the text is always outputWidth.jvty+The number of display columns for the text.kvty%the number of characters in the text.lvty9imageHeight partLeft == imageHeight partRight. Always > 0mvtyAlways  imageWidth croppedImage 0nvtyAlways  imageHeight croppedImage 0vty"A display text is a Data.Text.Lazyovty,pretty print just the structure of an image.vtyQThe width of an Image. This is the number display columns the image will occupy.vtyRThe height of an Image. This is the number of display rows the image will occupy.vty combines two images side by sidegCombines text chunks where possible. Assures outputWidth and outputHeight properties are not violated.The result image will have a width equal to the sum of the two images width. And the height will equal the largest height of the two images. The area not defined in one image due to a height missmatch will be filled with the background pattern.vtycombines two images verticallyThe result image will have a height equal to the sum of the heights of both images. The width will equal the largest width of the two images. The area not defined in one image due to a width missmatch will be filled with the background pattern.pvtyAppend in the q instance is equivalent to <->.rvtyAppend in the s instance is equivalent to <->.hgfedcba`ntuvlwxkjimyzoNone"$X,vty2A region of the display (first width, then height)vty)An area of the picture's background (See  Background).vty7Combines two images horizontally. This is an alias for .infixr 5vty5Combines two images vertically. This is an alias for .infixr 4vty_Compose any number of images together horizontally, with the first in the list being leftmost.vtySCompose any number of images vertically, with the first in the list being topmost.vtyMake an \ from a lazy text value. This function should not be given a text value containing escapes.vtyMake an W from a text value. This function should not be given a text value containing escapes.vty|Make an image from a single character. This is a standard Haskell 31-bit character assumed to be in the ISO-10646 encoding.vtyMake an image from a string of characters layed out on a single row with the same display attribute. The string is assumed to be a sequence of ISO-10646 characters. This function should not be given a string containing escapes.Note: depending on how the Haskell compiler represents string literals, a string literal in a UTF-8 encoded source file, for example, may be represented as a ISO-10646 string. That is, I think, the case with GHC 6.10. This means, for the most part, you don't need to worry about the encoding format when outputting string literals. Just provide the string literal directly to iso10646String or string.vtyMake an  from a {.This is an alias for iso10646String since the usual case is that a literal string like "foo" is represented internally as a list of ISO 10646 31 bit characters. This function should not be given a string containing escapes.Note: Keep in mind that GHC will compile source encoded as UTF-8 but the literal strings, while UTF-8 encoded in the source, will be transcoded to a ISO 10646 31 bit characters runtime representation.vtyMake an u from a string of characters layed out on a single row. The input is assumed to be the bytes for UTF-8 encoded text.vtyMake an & from a UTF-8 encoded lazy bytestring.vtyMake an ( from a UTF-8 encoded strict bytestring.vty<Make an image filling a region with the specified character._If either the width or height are less than or equal to 0, then the result is the empty image.vtyjThe empty image. Useful for fold combinators. These occupy no space and do not affect display attributes.vty[Pad the given image. This adds background character fills to the left, top, right, bottom.vty<Translates an image by padding or cropping the left and top.>If translation offsets are negative then the image is cropped.vty9Translates an image by padding or cropping its left side.vty3Translates an image by padding or cropping its top.vtykEnsure an image is no larger than the provided size. If the image is larger then crop the right or bottom.bThis is equivalent to a vertical crop from the bottom followed by horizontal crop from the right.vtyCrop an image's height. If the image's height is less than or equal to the specified height then this operation has no effect. Otherwise the image is cropped from the bottom.vtyCrop an image's width. If the image's width is less than or equal to the specified width then this operation has no effect. Otherwise the image is cropped from the right.vtyCrop an image's width. If the image's width is less than or equal to the specified width then this operation has no effect. Otherwise the image is cropped from the left.vtyCrop an image's height. If the image's height is less than or equal to the specified height then this operation has no effect. Otherwise the image is cropped from the top.vtyGeneric resize. Pads and crops are added to ensure that the resulting image matches the specified dimensions. This is biased to pad/crop the right and bottom.vtyyResize the width. Pads and crops as required to assure the given display width. This is biased to pad/crop on the right.vty|Resize the height. Pads and crops as required to assure the given display height. This is biased to pad/crop on the bottom.vtyFill width in columnsvtyFill height in rowsvtyThe attribute to use.vty+The character to use in filling the region.vtyThe region width.vtyThe region height.vty6How much padding to add to the left side of the image.vty0How much padding to add to the top of the image.vty7How much padding to add to the right side of the image.vty3How much padding to add to the bottom of the image.vtyThe image to pad.vty3The horizontal translation offset (can be negative)vty1The vertical translation offset (can be negative)vtyThe image to translate.vtyCropping widthvtyCropping heightvtyThe image to crop,,54$NoneX Safe7X/ vtyEvents.vty8A keyboard key was pressed with the specified modifiers.vtytA mouse button was pressed at the specified column and row. Any modifiers available in the event are also provided.vtyA mouse button was released at the specified column and row. Some terminals report only that a button was released without specifying which one; in that case, Nothing is provided. Otherwise Just the button released is included in the event.vty If read from  eventChannel; this is the size at the time of the signal. If read from  nextEvent this is the size at the time the event was processed by Vty. Typically these are the same, but if somebody is resizing the terminal quickly they can be different.vtyA paste event occurs when a bracketed paste input sequence is received. For terminals that support bracketed paste mode, these events will be triggered on a paste event. Terminals that do not support bracketed pastes will send the paste contents as ordinary input (which is probably bad, so beware!) Note that the data is provided in raw form and you'll have to decode (e.g. as UTF-8) if that's what your application expects.vty6The terminal running the application lost input focus.vty8The terminal running the application gained input focus.vtyMouse buttons.vtyModifier keys. Key codes are interpreted such that users are more likely to have Meta than Alt; for instance on the PC Linux console, 3 will generally correspond to the physical Alt key.vty%Representations of non-modifier keys.XKFun is indexed from 0 to 63. Range of supported FKeys varies by terminal and keyboard.[KUpLeft, KUpRight, KDownLeft, KDownRight, KCenter support varies by terminal and keyboard.dActually, support for most of these but KEsc, KChar, KBS, and KEnter vary by terminal and keyboard... SafeX5 vtyYA valid event was parsed. Any unused characters from the input stream are also provided.vty5The input characters did not represent a valid event.vtyJThe input characters form the prefix of a valid event character sequence. SafeX>vtyCRun a parser on a given input string. If the parser fails, return $. Otherwise return the valid event ()) and the remaining unparsed characters.vtyFail a parsing operation.vtyRead an integer from the input stream. If an integer cannot be read, fail parsing. E.g. calling readInt on an input of "123abc" will return '123' and consume those characters.vtymRead a character from the input stream. If one cannot be read (e.g. we are out of characters), fail parsing.vty^Read a character from the input stream and fail parsing if it is not the specified character. Safe 2=>?UVXmUvtyA Vty configuration.vtyThe default is 1 character.vty-The default is 100 milliseconds, 0.1 seconds. vtyThe default is False. vtyThe default is False. vty;Debug information is appended to this file if not Nothing. vtyiThe (input byte, output event) pairs extend the internal input table of VTY and the table from terminfo.See Graphics.Vty.Config0 module documentation for documentation of the map directive. vty2The input file descriptor to use. The default is |vty3The output file descriptor to use. The default is }vtytThe terminal name used to look up terminfo capabilities. The default is the value of the TERM environment variable.vtyTerminal width map files.vty9Whether to permit custom Unicode width table loading by %. ~ [ indicates that table loading should not be performed. Other values permit table loading.If a table load is attempted and fails, information about the failure will be logged to the debug log if the configuration specifies one. If no custom table is loaded (or if a load fails), the built-in character width table will be used.vtyMappings from input bytes to event in the order specified. Later entries take precedence over earlier in the case multiple entries have the same byte string.vty6Type of errors that can be thrown when configuring VTYvty!TERM environment variable not setvtyLoad a configuration from  and $VTY_CONFIG_FILE.vtyOConfigures VTY using defaults suitable for terminals. This function can raise .!vtyGet the "erase" character for the terminal attached to the specified file descriptor. This is the character configured by 'stty erase'. If the call to  tcgetattr fails, this will return . Otherwise it will return the character that has been configured to indicate the canonical mode ERASE behavior. That character can then be added to the table of strings that we interpret to mean Backspace.For more details, see: Hhttps://www.gnu.org/software/libc/manual/html_node/Canonical-or-Not.html 8https://www.gsp.com/cgi-bin/man.cgi?section=1&topic=stty 8https://github.com/matterhorn-chat/matterhorn/issues/565"vtyAdd a widthMap@ directive to the Vty configuration file at the specified path.If the configuration path refers to a configuration that already contains the directive for the specified map and terminal type, the configuration file will not be modified. If the file does not contain the directive, it will be appended to the file.If the configuration path does not exist, a new configuration file will be created and any directories in the path will also be created. This returns True3 if the configuration was created or modified and False\ otherwise. This does not handle exceptions raised by file or directory permissions issues."vtyFThe configuration file path of the configuration to modify or create.vtyThe TERM value for the widthMap directive.vty,The width table file path for the directive.#      !"#      !" SafeXrc9vtyIThese sequences set xterm-based terminals to send focus event sequences.:vty%These sequences disable focus events.;vty3Does the specified string begin with a focus event?<vty5Attempt to classify an input string as a focus event.9:;<9:;< SafeXvu=vtyIThese sequences set xterm-based terminals to send mouse event sequences.>vty%These sequences disable mouse events.?vty3Does the specified string begin with a mouse event?@vty4Attempt to lassify an input string as a mouse event.=>?@=>?@SafeXyAvty'Does the input start a bracketed paste?Bvty2Does the input contain a complete bracketed paste?CvtyIParse a bracketed paste. This should only be called on a string if both A and B return .ABCCAB&SafeXzZ'None"#XFvty8Channel of events direct from input processing. Unlike  nextEvent< this will not refresh the display if the next event is an .GvtymShuts down the input processing. This should return the terminal input state to before he input initialized.Hvty9Changes to this value are reflected after the next event.Ivtyinput debug log*DEIHGF(SafeXvtyEncoding for navigation keys.vty-encoding for shift, meta and ctrl plus arrowshomeendvty2encoding for ins, del, pageup, pagedown, home, endvty9encoding for ctrl + ins, del, pageup, pagedown, home, endvty%encoding for shift plus function keys According to Bhttp://aperiodic.net/phil/archives/Geekery/term-function-keys.html&This encoding depends on the terminal.vtyencoding for meta plus char removed ESCB from second list due to duplication with "special_support_keys".removed '[' from second list due to conflict with 7-bit encoding for ESC. Whether meta+[ is the same as ESC should examine km and current encoding.stopped enumeration at '~' instead of '\DEL'7. The latter is mapped to KBS by special_support_keys.SafeX Jvty|Queries the terminal for all capability-based input sequences and then adds on a terminal-dependent input sequence mapping.For reference see: /http://vimdoc.sourceforge.net/htmldoc/term.htmlvim74srcterm.c #http://invisible-island.net/vttest/ Bhttp://aperiodic.net/phil/archives/Geekery/term-function-keys.htmlTerminfo is incomplete. The vim source implies that terminfo is also incorrect. Vty assumes that the internal terminfo table added to the system-provided terminfo table is correct.The procedure used here is: >Build terminfo table for all caps. Missing caps are not added.7Add tables for visible chars, esc, del, ctrl, and meta.5Add internally-defined table for given terminal type.(Precedence is currently implicit in the compile algorithm.Kvty*The key table applicable to all terminals.VNote that some of these entries are probably only applicable to ANSI/VT100 terminals.MvtyJTables specific to a given terminal that are not derivable from terminfo.Note that this adds the ANSIVT100+VT50 tables regardless of term identifier.Nvty:Visible characters in the ISO-8859-1 and UTF-8 common set.{We limit to < 0xC1. The UTF8 sequence detector will catch all values 0xC2 and above before this classify table is reached.Ovty[Non-printable characters in the ISO-8859-1 and UTF-8 common set translated to ctrl + char.#This treats CTRL-i the same as tab.PvtyCtrl+Meta+CharQvty6Esc, meta-esc, delete, meta-delete, enter, meta-enter.RvtyQA classification table directly generated from terminfo cap strings. These are:ka1 - keypad up-leftka3 - keypad up-rightkb2 - keypad centerkbs - keypad backspace kbeg - beginkcbt - back tabkc1 - keypad left-downkc3 - keypad right-downkdch1 - delete kcud1 - down kend - end kent - enterkf0 - kf63 - function keys khome - KHomekich1 - insert kcub1 - leftknp - next page (page down)kpp - previous page (page up) kcuf1 - rightkDC - shift deletekEND - shift endkHOM - shift homekIC - shift insertkLFT - shift leftkRIT - shift right kcuu1 - upSvtyCap names for function keys. JKLMNOPQRS JKLMNOPQRSNone"#XTvty)Set up the terminal with file descriptor   for input. Returns an D. The table used to determine the Events, to produce for the input bytes comes from JR which is then overridden by the the applicable entries from the configuration's  .6The terminal device is configured with the attributes:IXON disabled: disables software flow control on outgoing data. This stops the process from being suspended if the output terminal cannot keep up.Raw mode is used for input.EISIG disabled (enables keyboard combinations that result in signals)1ECHO disabled (input is not echoed to the output)>ICANON disabled (canonical mode (line mode) input is not used)1IEXTEN disabled (extended functions are disabled)4DEFGHIT4DEFGHITNoneXOUvtyA ^4 has a background pattern. The background is either:OClearBackground, which shows the layer below or is blank if the bottom layer#A character and a display attributeXIf the display attribute used previously should be used for a background fill then use C for the background attribute.WvtyA ClearBackground is:7the space character if there are remaining non-skip ops3End of line if there are no remaining non-skip ops.ZvtyjA picture can be configured to hide the cursor or to show the cursor at the specified character position.There is not a 1:1 map from character positions to a row and column on the screen due to characters that take more than 1 column.[vtyHide the cursor\vtywShow the cursor at the given logical column accounting for character width in the presence of multi-column characters.]vty=Show the cursor at the given absolute terminal column and row^vtyA Vty picture.+These can be constructed directly or using f.`vtyThe picture's cursor.avty,The picture's image layers (top-most first).bvtyJThe picture's background to be displayed in locations with no Image data.cvty5A picture with no cursor, background or image layers.dvtyAdd an  as the top-most layer of a ^.evtyAdd an  as the bottom-most layer of a ^.fvtyCreate a picture from the given image. The picture will not have a displayed cursor and no background pattern (ClearBackground) will be used.gvty7Create a picture with the given layers, top-most first.fThe picture will not have a displayed cursor and no background pattern (ClearBackgroun) will be used.hvtyReturn the top-most * layer for a picture. This is unsafe for ^s without at least one layer._This is provided for compatibility with applications that do not use more than a single layer.UVWXYZ\[]^_`abcdefgh^_`abZ\[]UVWXYcdefghNone$&'Xk pvtyRA vector of span operation vectors for display, one per row of the output region.qvty2A vector of span operations executed in succession. This represents the operations required to render a row of the terminal. The operations in one row may affect subsequent rows. For example, setting the foreground color in one row will affect all subsequent rows until the foreground color is changed.rvtyiThis represents an operation on the terminal: either an attribute change or the output of a text string.svtyA span of UTF-8 text occupies a specific number of screen space columns. A single UTF character does not necessarily represent 1 colunm. See Codec.Binary.UTF8.Width TextSpan [Attr] [output width in columns] [number of characters] [data]tvty"Skips the given number of columns.uvtyMarks the end of a row. Specifies how many columns are remaining. These columns will not be explicitly overwritten with the span ops. The terminal is require to assure the remaining columns are clear.|vty5The number of columns the DisplayOps are defined for.8All spans are verified to define same number of columns.}vty2The number of rows the DisplayOps are defined for.vty(The number of columns a SpanOps affects.vty(The width of a single SpanOp in columns.vtyMThe number of columns to the character at the given position in the span op.pqrustyxwvz{|}~rustyxwvqz{p|}~None$ESXvtyqProduces the span ops that will render the given picture, possibly cropped or padded, into the specified region.vtyPReturns the DisplayOps for an image rendered to a window the size of the image.!largerly used only for debugging.vty8Produces the span ops for each layer then combines them.vtyVBuilds a vector of row operations that will output the given picture to the terminal."Crops to the given display region.vtyYAdd the operations required to build a given image to the current set of row operations.vtyFThis adds an image that might be partially clipped to the output ops.This is a very touchy algorithm. Too touchy. For instance, the CropRight and CropBottom implementations are odd. They pass the current tests but something seems terribly wrong about all this.vty8snocs the operation to the operations for the given row.''None &'>ESX)vtyThe cursor position is given in X,Y character offsets. Due to multi-column characters this needs to be translated to column, row positions.vty*Provide the bounds of the display context.vtySets the output position to the specified row and column where the number of bytes required for the control codes can be specified seperate from the actual byte sequence.vty?Reset the display attributes to the default display attributes.vtySee )vty"The Vty terminal output interface.vty:Text identifier for the output device. Used for debugging.vtylRelease the terminal just prior to application exit and reset it to its state prior to application startup.vtyMClear the display and initialize the terminal to some initial display state.The expectation of a program is that the display starts in some The initial state. initial state would consist of fixed values:cursor at top leftUTF-8 character encoding'drawing characteristics are the defaultvty'Return the display to the state before G If no previous state then set the display state to the initial state.vty#Returns the current display bounds.vty-Output the bytestring to the terminal device.vtyASpecifies the maximum number of colors supported by the context.vty3Specifies whether the cursor can be shown / hidden.vty<Indicates support for terminal modes for this output device.vtyFEnables or disables a mode (does nothing if the mode is unsupported).vty"Returns whether a mode is enabled.vtyAcquire display access to the given region of the display. Currently all regions have the upper left corner of (0,0) and the lower right corner at (max displayWidth providedWidth, max displayHeight providedHeight)vty$Ring the terminal bell if supported.vty7Returns whether the terminal has an audio bell feature.vty9Modal terminal features that can be enabled and disabled.vtyNMouse mode (whether the terminal is configured to provide mouse input events)vtyOPaste mode (whether the terminal is configured to provide events on OS pastes)vtyaFocus-in/focus-out events (whether the terminal is configured to provide events on focus change)vtyHyperlink mode via the A attribute modifier (see  Chttps://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). Note that this may not work gracefully in all terminal emulators so be sure to test this mode with the terminals you intend to support. It is off by default.vtyZAll terminals serialize UTF8 text to the terminal device exactly as serialized in memory.vtyDisplays the given ^. )The image is cropped to the display size.>Converted into a sequence of attribute changes and text spans.The cursor is hidden.Serialized to the display.7The cursor is then shown and positioned or kept hidden.vty{Not all terminals support all display attributes. This filters a display attribute to what the given terminal can display.))None"#=?XXvtyThe sequence of terminfo caps to apply a given style are determined - according to these rules. - - 1. The assumption is that it's preferable to use the simpler - enter/exit mode capabilities than the full set display attribute - state capability. - - 2. If a mode is supposed to be removed but there is not an exit - capability defined then the display attributes are reset to defaults - then the display attribute state is set. - - 3. If a mode is supposed to be applied but there is not an enter - capability defined then then display attribute state is set if - possible. Otherwise the mode is not applied. - - 4. If the display attribute state is being set then just update the - arguments to that for any apply/remove.vtyConstructs an output driver that uses terminfo for all control codes. While this should provide the most compatible terminal, terminfo does not support some features that would increase efficiency and improve compatibility:zdetermining the character encoding supported by the terminal. Should this be taken from the LANG environment variable?IProviding independent string capabilities for all display attributes.vtyWrite the escape sequences that are used in some terminals to include embedded hyperlinks. As of yet, this information isn't included in termcap or terminfo, so this writes them directly instead of looking up the appropriate capabilities.vtyCPortably setting the display attributes is a giant pain in the ass.If the terminal supports the sgr capability (which sets the on/off state of each style directly ; and, for no good reason, resets the colors to the default) this procedure is used: >set the style attributes. This resets the fore and back color.C1, If a foreground color is to be set then set the foreground color "likewise with the background colorIf the terminal does not support the sgr cap then: if there is a change from an applied color to the default (in either the fore or back color) then: #reset all display attributes (sgr0)enter required style modesset the fore color if requiredset the back color if requiredEntering the required style modes could require a reset of the display attributes. If this is the case then the back and fore colors always need to be set if not default.)This equation implements the above logic.Note that this assumes the removal of color changes in the display attributes is done as expected with noColors == True. See .JNote that this optimizes for fewer state changes followed by fewer bytes.vty~The color table used by a terminal is a 16 color set followed by a 240 color set that might not be supported by the terminal.yThis takes a Color which clearly identifies which pallete to use and computes the index into the full 256 color pallete.vty!For terminals without setaf/setab8See table in `man terminfo` Will error if not in table.NoneXbvtyBConstruct an Xterm output driver. Initialize the display to UTF-8.vtyEnable bracketed paste mode: #http://cirw.in/blog/bracketed-pastevtyDisable bracketed paste mode:vty:These sequences set xterm based terminals to UTF-8 output.9There is no known terminfo capability equivalent to this.vty:These sequences set xterm based terminals to UTF-8 output.9There is no known terminfo capability equivalent to this.vtyI think xterm is broken: Reseting the background color as the first bytes serialized on a new line does not effect the background color xterm uses to clear the line. Which is used *after* the next newline.None=?HVXnvty9The mock display terminal produces a string representation of the requested picture. There is *not* an isomorphism between the string representation and the picture. The string representation is a simplification of the picture that is only useful in debugging VTY without considering terminal specific issues.%The mock implementation is useful in manually determining if the sequence of terminal operations matche the expected sequence. The requirement of the produced representation is simplicity in parsing the text representation and determining how the picture was mapped to terminal operations.yThe string representation is a sequence of identifiers where each identifier is the name of an operation in the algebra.None"#$X~vty Returns an  for the terminal specified in .The specific Output implementation used is hidden from the API user. All terminal implementations are assumed to perform more, or less, the same. Currently, all implementations use terminfo for at least some terminal specific information.If a terminal implementation is developed for a terminal without terminfo support then Vty should work as expected on that terminal.+Selection of a terminal is done as follows:5If TERM contains "xterm" or "screen", use XTermColor.'otherwise use the TerminfoBased driver.vty<Sets the cursor position to the given output column and row.This is not necessarially the same as the character position with the same coordinates. Characters can be a variable number of columns in width.Currently, the only way to set the cursor position to a given character coordinate is to specify the coordinate in the Picture instance provided to  or refresh.vtyHides the cursor.vtyShows the cursor.NoneX8SafeX3vty7A run-length-encoded table of Unicode character widths.vtyThe ranges in the table.vty(A range of code points in a width table.vty The range's starting code point.vty]The number of code points in the contiguous range, beginning with the starting code point ().vtyjThe terminal width, in columns, of all of the characters corresponding to the code points in this range.SafePXQvtyConvert a sequence of character/width pairs into a list of run-length encoded ranges. This function assumes the pairs come sorted by character ordinal value. It does not require that the character range is fully covered by the sequence.aThe result of this function is a list of ranges in reverse order relative to the input sequence.vtyConstruct a unicode character width table by querying the terminal connected to stdout. This works by emitting characters to stdout and then querying the terminal to determine the resulting cursor position in order to measure character widths. Consequently this will generate a lot of output and may take a while, depending on your system performance. This should not be run in a terminal while it is controlled by Vty.The argument specifies the upper bound code point to test when building the table. This allows callers to decide how much of the Unicode code point space to scan when building the table. This does not handle exceptions.NoneXvtyException type raised by .vtyVThe width table could not be initialized. Args: failure status, requested table size.vtySA code point range could not be configured. Args: failure status, offending range.vty7The table could not be activated. Args: failure status.vty;The lock used to make functions in this module thread-safe.vty[Returns True if and only if a custom table has been allocated and marked as ready for use.This function is thread-safe.vtyPInstall a custom unicode character width table. Such tables are obtained with * and +.aALERT! This function is probably not what you want to use because it is automatically called by %R. You will only ever need to call this function if you want to use functions in ,-( without controlling the terminal with %.!This affects the behavior of the .r function and functions that call it. It does so by changing global state available to the C implementation of .Q. To ensure that your program gets consistent results from evaluating calls to .J, the installation of a custom table should be performed before you call . in your program.2This is best done at Vty startup, and if you use %, that function calls this automatically based on the Vty configuration's declared width tables. It is exposed as part of the public API so that applications can call this as needed if they don't want to control the terminal with mkVty but do want to make calls to ..It's also important to note that once a custom table has been installed, it is permanent for the life of the process. No new table can be installed, and the new custom table cannot be removed.If this function fails for any reason -- if the table cannot be installed or is invalid, or if a custom table already exists -- this will raise a  exception.This function is thread-safe.SafeXvty:Load a binary unicode width table from the specified file.wThis either returns a successfully parsed table or a table parsing error message. This does not handle I/O exceptions.vty#Parse a binary unicode width table.vty4Write the unicode width table to the specified path.$This does not handle I/O exceptions.vty5Width table magic bytes for use in the binary format.NoneXϕ vtyiA Vty value represents a handle to the Vty library that the application must create in order to use Vty..The use of Vty typically follows this process: Initialize vty with & (this takes control of the terminal).Use  to display a picture.Use  to get the next input event.%Depending on the event, go to 2 or 5.1Shutdown vty and restore the terminal state with  . At this point the  handle cannot be used again..Operations on Vty handles are not thread-safe.vtyOutputs the given ^.vtyReturn the next ' or block until one becomes available.vtyNon-blocking version of . vtyThe input interface. See D. vtyThe output interface. See . vtyRefresh the display. If other programs output to the terminal and mess up the display then the application might want to force a refresh using this function. vtyClean up after vty. A call to this function is necessary to cleanly restore the terminal state before application exit. The above methods will throw an exception if executed after this is executed. Idempotent.vtyaCreate a Vty handle. At most one handle should be created at a time for a given terminal device.IThe specified configuration is added to the the configuration loaded by  with the ' configuration taking precedence. See Graphics.Vty.Config.For most applications mkVty defaultConfig is sufficient. #$%&'()*+,-./0123456789:;<=>?@ABC      !"DEFGHITUVWXYZ\[]^_`abcdefgh          /NoneX׼vty&This will create a Vty instance using j and execute an IO action provided that instance. The created Vty instance will be stored to the unsafe  .BThis instance will use duplicates of the stdin and stdout Handles.NoneXvty)Set the background color to the provided  .vty)Set the foreground color to the provided  .vtyAttempt to change the # of the following text..mIf the terminal does not support the style change then no error is produced. The style can still be removed.vty Attempt to remove the specified #) from the display of the following text.This will fail if 5 for the given style has not been previously called.vtyReset the display attributes.vtyRApply the provided display attribute changes to the given terminal output device.!This does not flush the terminal.vtyMApply the provided display attributes changes to the terminal output device.$This will flush the terminal output.  .0123456"7"89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~######$$$$$$$$$$$         ! " # $ % & ' ( ) * + , - . / / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ 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 ijkl'm'm'n'o'p'qrstuvwxyz{|}}~)      *+ !"#$%%/&''()*+,-./0123456 7 7 8 9 : ; ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T 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#{#|#}#~###############&''''''''''''''''''''''''''''''''''''(((((((////vty-5.28-8oXXMDFPQEdBky0gac1ZfUGraphics.Text.WidthGraphics.Vty.Attributes.ColorGraphics.Vty.AttributesGraphics.Vty.DisplayAttributesGraphics.Vty.ErrorGraphics.Vty.ImageGraphics.Vty.DebugGraphics.Vty.Input.Events!Graphics.Vty.Input.Classify.Types!Graphics.Vty.Input.Classify.ParseGraphics.Vty.ConfigGraphics.Vty.Input.FocusGraphics.Vty.Input.MouseGraphics.Vty.Input.PasteGraphics.Vty.InputGraphics.Vty.Input.TerminfoGraphics.Vty.PictureGraphics.Vty.SpanGraphics.Vty.PictureToSpansGraphics.Vty.Output.Interface!Graphics.Vty.Output.TerminfoBasedGraphics.Vty.Output.XTermColorGraphics.Vty.Output.MockGraphics.Vty.Output$Graphics.Vty.UnicodeWidthTable.Types$Graphics.Vty.UnicodeWidthTable.Query&Graphics.Vty.UnicodeWidthTable.Install!Graphics.Vty.UnicodeWidthTable.IO Graphics.VtyGraphics.Vty.InlineCodec.Binary.UTF8.DebugData.Terminfo.ParseData.Terminfo.Eval Graphics.Vty.Attributes.Color240Graphics.Vty.Image.InternalGraphics.Vty.Debug.ImagemkVtyGraphics.Vty.Input.ClassifyGraphics.Vty.Input.Loop"Graphics.Vty.Input.Terminfo.ANSIVT inlineHackbuildUnicodeWidthTablereadUnicodeWidthTable Graphics.TextWidthwcwidthGraphics.Vty.Inline.Unsafewcswidthwctwidth wctlwidth safeWcwidth safeWcswidth safeWctwidth safeWctlwidthrgbColorToColor240color240CodeToRGBColorISOColorColor240blackredgreenyellowbluemagentacyanwhite brightBlack brightRed brightGreen brightYellow brightBlue brightMagenta brightCyan brightWhitergbColor $fEqColor $fShowColor $fReadColor$fGenericColor $fNFDataColorStyle MaybeDefaultDefault KeepCurrentSetTo FixedAttr fixedStylefixedForeColorfixedBackColorfixedURLAttr attrStyle attrForeColor attrBackColorattrURLstandout underline reverseVideoblinkdimbolditalicdefaultStyleMask styleMaskhasStyle withForeColor withBackColor withStylewithURLdefAttr currentAttr$fMonoidMaybeDefault$fSemigroupMaybeDefault$fNFDataMaybeDefault $fMonoidAttr$fSemigroupAttr $fEqFixedAttr$fShowFixedAttr$fEqAttr $fShowAttr $fReadAttr $fGenericAttr $fNFDataAttr$fReadMaybeDefault$fShowMaybeDefault$fEqMaybeDefaultURLDiffLinkTo NoLinkChangeEndLinkStyleStateChange ApplyStandoutRemoveStandout ApplyItalic RemoveItalicApplyUnderlineRemoveUnderlineApplyReverseVideoRemoveReverseVideo ApplyBlink RemoveBlinkApplyDim RemoveDim ApplyBold RemoveBoldDisplayColorDiffColorToDefault NoColorChangeSetColorDisplayAttrDiff styleDiffs foreColorDiff backColorDiffurlDifffixDisplayAttrsimplifyStyleDiffssimplifyColorDiffssimplifyUrlDiffsdisplayAttrDiffsdiffURL diffColor diffStyles$fMonoidDisplayAttrDiff$fSemigroupDisplayAttrDiff$fShowDisplayColorDiff$fEqDisplayColorDiff$fShowStyleStateChange$fEqStyleStateChange $fShowURLDiff $fEqURLDiff$fShowDisplayAttrDiff VtyException VtyFailureImage DisplayText imageWidth imageHeight horizJoinvertJoin DisplayRegion regionWidth regionHeightbackgroundFill<|><->horizCatvertCattexttext'chariso10646Stringstring utf8Stringutf8Bytestringutf8Bytestring'charFill emptyImagepad translate translateX translateYcrop cropBottom cropRightcropLeftcropTopresize resizeWidth resizeHeight ImageEndoImageOpImageConstructEventImageConstructLogforwardImageOpsforwardTransformreverseTransform debugImageOps idImageOp ClassifyMapEventEvKey EvMouseDown EvMouseUpEvResizeEvPaste EvLostFocus EvGainedFocusButtonBLeftBMiddleBRight BScrollUp BScrollDownModifierMShiftMCtrlMMetaMAltKeyKEscKCharKBSKEnterKLeftKRightKUpKDownKUpLeftKUpRight KDownLeft KDownRightKCenterKFunKBackTabKPrtScrKPauseKInsKHomeKPageUpKDelKEnd KPageDownKBeginKMenu$fEqKey $fShowKey $fReadKey$fOrdKey $fGenericKey $fEqModifier$fShowModifier$fReadModifier $fOrdModifier$fGenericModifier $fEqButton $fShowButton $fReadButton $fOrdButton$fGenericButton $fEqEvent $fShowEvent $fReadEvent $fOrdEvent$fGenericEventKClassValidInvalidPrefix $fShowKClass $fEqKClassParser runParser failParsereadIntreadChar expectCharConfigUpdateResultConfigurationCreatedConfigurationModifiedConfigurationConflictConfigurationRedundantConfigvminvtime mouseModebracketedPasteModedebugLoginputMapinputFdoutputFdtermName termWidthMapsallowCustomUnicodeWidthTablesInputMapVtyConfigurationErrorVtyMissingTermEnvVar defaultConfigvtyDataDirectory vtyConfigPathvtyConfigFileEnvName userConfigwidthTableFilenamecurrentTerminalNameterminalWidthTablePathoverrideEnvConfigstandardIOConfigparseConfigFilerunParseConfiggetTtyEraseCharaddConfigWidthMap $fExceptionVtyConfigurationError$fMonoidConfig$fSemigroupConfig $fParse[]$fParseModifier $fParseKey $fParseInt $fParseChar $fGParse:*: $fGParseK1 $fGParseU1 $fGParseM1$fGParseAltsV1$fGParseAlts:+:$fGParseAltsM1 $fGParseM10$fShowVtyConfigurationError$fEqVtyConfigurationError $fShowConfig $fEqConfig$fEqConfigUpdateResult$fShowConfigUpdateResultrequestFocusEventsdisableFocusEvents isFocusEventclassifyFocusEventrequestMouseEventsdisableMouseEvents isMouseEventclassifyMouseEventbracketedPasteStartedbracketedPasteFinishedparseBracketedPasteInput _eventChannel shutdownInput _configRef _inputDebugclassifyMapForTermuniversalTablecapsClassifyMaptermSpecificTables visibleChars ctrlChars ctrlMetaCharsspecialSupportKeyskeysFromCapsTablefunctionKeyCapsTableinputForConfig BackgroundClearBackgroundbackgroundCharbackgroundAttrCursorNoCursorAbsoluteCursorPicture picCursor picLayers picBackground emptyPictureaddToTop addToBottom picForImage picForLayerspicImage$fNFDataCursor$fNFDataBackground$fNFDataPicture $fShowPicture $fEqCursor$fEqBackground $fEqPicture DisplayOpsSpanOpsSpanOpTextSpanSkipRowEnd textSpanAttrtextSpanOutputWidthtextSpanCharWidth textSpanTextdropOps splitOpsAtdisplayOpsColumnsdisplayOpsRowsaffectedRegionspanOpsAffectedColumnsspanOpHasWidthcolumnsToCharOffset $fShowSpanOp $fEqSpanOp BlitState _columnOffset _rowOffset _skipColumns _skipRows_remainingColumns_remainingRowsMSpanOpsMRowOpsBlitEnv_region_mrowOps columnOffsetremainingColumns remainingRows rowOffset skipColumnsskipRowsBlitMmrowOpsregiondisplayOpsForPicdisplayOpsForImagecombinedOpsForLayerssubstituteSkips mergeUnder mergeRowUnder swapSkipsForSingleColumnCharSpanswapSkipsForCharSpan buildSpansstartImageBuild isOutOfBoundsaddMaybeClippedaddMaybeClippedJoinaddUnclippedTextaddRowCompletionsnocOpDisplayContext contextDevice contextRegionwriteMoveCursorwriteShowCursorwriteHideCursor writeSetAttrwriteDefaultAttr writeRowEnd AssumedState prevFattr prevOutputOpsOutput terminalIDreleaseTerminalreserveDisplayreleaseDisplay displayBoundsoutputByteBuffercontextColorCountsupportsCursorVisibility supportsModesetMode getModeStatusassumedStateRefmkDisplayContextringTerminalBell supportsBellModeMouseBracketedPasteFocus HyperlinkdisplayContextinitialAssumedState outputPicturelimitAttrForDisplay$fEqMode $fReadMode $fShowModereserveTerminalMockData mockTerminaloutputForConfig setCursorPos hideCursor showCursor MockWindowSpanConstructEvent SpanSetAttrSpanConstructLogrowOpsAffectedColumnsallSpansHaveWidthspanOpsAffectedRows isSetAttrregionForWindow$fShowMockWindow$fEqMockWindowUnicodeWidthTableunicodeWidthTableRangesWidthTableRange rangeStart rangeSize rangeColumns$fEqWidthTableRange$fShowWidthTableRange$fShowUnicodeWidthTabledefaultUnicodeTableUpperBoundTableInstallExceptionTableInitFailureTableRangeFailureTableActivationFailureisCustomTableReadyinstallUnicodeWidthTable $fExceptionTableInstallException$fEqTableInstallException$fShowTableInstallExceptionparseUnicodeWidthTablewriteUnicodeWidthTableVtyupdate nextEventnextEventNonblocking inputIface outputIfacerefreshshutdown isShutdownwithVty InlineState inlineAttrinlineUrlsEnabledInlineM backColor foreColor applyStyle removeStyle defaultAll putAttrChangeputAttrChange_ utf8FromIsoppUtf8parsec-3.1.13.0Text.Parsec.Error ParseError BuildResults outCapOps outParamCount outParamOps BuildState nextOffset CapParserParamOp IncFirstTwoParamOpsCapOpBytesDecOutCharOut PushParam PushValue Conditional BitwiseOr BitwiseXOr BitwiseAnd ArithPlus ArithMinus CompareEq CompareLt CompareGtconditionalExprconditionalPartsCapOpsCapParam CapExpressioncapOpscapBytes sourceString paramCountparamOpsparseCapExpressionconstructCapExpressioncapExpressionParserparamEscapeParserliteralPercentParser paramOpParserincrementOpParser pushOpParser decOutParser charOutParserconditionalOpParserconditionalTrueParserconditionalFalseParserconditionalEndParserbitwiseOpParserbitwiseOrParserbitwiseAndParserbitwiseXorParser arithOpParserliteralIntOpParsercompareOpParser bytesOpParsercharConstParser incOffsetinitialBuildState EvalState writeCapExpr HorizText HorizJoinVertJoinBGFill CropRightCropLeft CropBottomCropTop EmptyImage displayText outputWidth charWidth outputHeightleftSkiptopSkipppImageStructure $fMonoidImagebaseGHC.BaseMonoid$fSemigroupImage Semigroup croppedImage partBottompartTop partRightpartLeftattrclipTextString unix-2.7.2.2System.Posix.IO.CommonstdInput stdOutput GHC.MaybeJustghc-prim GHC.TypesFalseNothingTrueclassify InputBuffer_size_ptr configRef eventChannel inputDebug InputState _classifier _inputBuffer_appliedConfig_unprocessedBytesptrsizeInputM setTermTiming appliedConfig classifier inputBufferunprocessedByteslogMsgloopInputProcessoraddBytesToProcessemitreadFromDevice applyConfig parseEvent dropInvalidrunInputProcessorLoopattributeControllogInitialInputState initInput forkOSFinally<>=<>~navKeys0navKeys1navKeys2navKeys3 functionKeys1 functionKeys2 classifyTableCursorOutputMap writeUtf8TextDisplayAttrSeqwriteURLEscapesterminfoWriteSetAttransiColorIndex altColorIndexenableBracketedPastesdisableBracketedPastessetUtf8CharSetsetDefaultCharSetxtermInlineHackmkRanges installLockwidthTableMagic GHC.IORefIORef globalVty globalOutput mkDupeConfig withOutput