W]      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   Safe-InferredDA' Noneq      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde Nonefcapability evaluator state ghfijklmnopqrstuvwrughfijklmnopqrstuvwNonexyxy Safe-InferredZStyles 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. )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 2 color palette and the second 8 colors are bright/&vivid versions of the first 8 colors. T 240 color palette. This palette is a regular sampling of the full RGB colorspace. -The 8 ISO 6429 (ANSI) colors are as follows:   black  red  green  yellow  blue  magenta  cyan  white `The 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 colorsL property. If this property is not being accurately reported then the color ! reproduction will be incorrect. If the terminal reports <G= 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. aAll of this assumes the terminals are behaving similarly to xterm and rxvt when handling colors. a 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. \The style and color attributes can either be the terminal defaults. Or be equivalent to the 3 previously applied style. Or be a specific value. ]Specifies the display attributes such that the final style and color values do not depend on Z the previously applied display attribute. The display attributes can still depend on the  terminal'"s default colors (unfortunately). YA 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. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. ,Standard 8-color ANSI terminal color codes. Bright/-Vivid variants of the standard 8-color ANSI Bright/-Vivid variants of the standard 8-color ANSI Bright/-Vivid variants of the standard 8-color ANSI Bright/-Vivid variants of the standard 8-color ANSI $!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) %!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) &!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) '!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) (!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) )!The 6 possible style attributes:  standout  underline  reverse_video  blink  dim  bold/bright [( The invisible, protect, and altcharset display attributes some terminals support are not  supported via VTY.) ,;true if the given Style value has the specified Style set. -Set the foreground color of an . .Set the background color of an . /Add the given style attribute 0^Sets the style, background color and foreground color to the default values for the terminal. Z There is no easy way to determine what the default background and foreground colors are. 1XKeeps the style, background color and foreground color that was previously set. Used to + override some part of the previous style. EG: current_style - bright_magenta `Would be the currently applied style (be it underline, bold, etc) but with the foreground color  set to bright_magenta. 2  !"#$%&'()*+,-./01z{0  !"#$%&'()*+,-./010   #"!$)('&%*+,-./01%    !"#$%&'()*+,-./01z{None2An image in VTY defines: ] properties required to display the image. These are properties that effect the output image % but are independent of position S A set of position-dependent text and attribute regions. The possible regions are:  a point. ( char ) P a horizontal line of characters with a single attribute. (string, utf8_string,  utf8_bytestring ) + a fill of a single character. (char_fill)  a fill of the picture' s background. (background_fill) Ctodo: increase the number of encoded bytestring formats supported. DWe pair each character with it'?s display length. This way we only compute the length once per  character. P * Though currently the width of some strings is still compute multiple times. EAn area of the picture'6s bacground (See Background) of w columns and h rows. FQThe width of an Image. This is the number display columns the image will occupy. GRThe height of an Image. This is the number of display rows the image will occupy. H"Combines two images side by side. bThe 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 7 missmatch will be filled with the background pattern. I Combines two images vertically. U The 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. J+Compose any number of images horizontally. K)Compose any number of images vertically. L]an image of a single character. This is a standard Haskell 31-bit character assumed to be in  the ISO-10646 encoding. M`A string of characters layed out on a single row with the same display attribute. The string is 4 assumed to be a sequence of ISO-10646 characters. ]Note: depending on how the Haskell compiler represents string literals a string literal in a T UTF-8 encoded source file, for example, may be represented as a ISO-10646 string. Q 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 iso_10646_string or string. NOAlias for iso_10646_string. Since the usual case is that a literal string like foo is D represented internally as a list of ISO 10646 31 bit characters. `Note: Keep in mind that GHC will compile source encoded as UTF-8 but the literal strings, while Z UTF-8 encoded in the source, will be transcoded to a ISO 10646 31 bit characters runtime  representation. O\A string of characters layed out on a single row. The string is assumed to be a sequence of  UTF-8 characters. PaReturns the display width of a character. Assumes all characters with unknown widths are 1 width Q^Returns the display width of a string. Assumes all characters with unknown widths are 1 width R%Renders a UTF-8 encoded bytestring. S_creates a fill of the specified character. The dimensions are in number of characters wide and  number of rows high. ZUnlike the Background fill character this character can have double column display width. T[The empty image. Useful for fold combinators. These occupy no space nor define any display  attributes. U%Apply the given offset to the image. VWEnsure an image is no larger than the provided size. If the image is larger then crop. WQEnsure an image is at least the provided size. If the image is smaller then pad. |9Currently append in the Monoid instance is equivalent to  -. +23456789:;<=>?@ABCD}~EFGHIJKLMNOPQRSTUVW|X  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW-D2?;876543@ABC<=B>9:B>B>FGHIJKELNMORSTUPQVW2?;876543@ABC<=B>9:B>B>D}~EFGHIJKLMNOPQRSTUVW|  Safe-Inferred@Style attribute changes are transformed into a sequence of apply/removes of the individual  attributes. 8Difference between two display color attribute changes. ^difference between two display attributes. Used in the calculation of the operations required / to go from one display attribute to the next. aPreviously, 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. WGiven the previously applied display attributes as a FixedAttr and the current display a attributes as an Attr produces a FixedAttr that represents the current display attributes. This J is done by using the previously applied display attributes to remove the  KeepCurrent  abstraction. ;Used in the computation of a final style attribute change. :TODO(corey): not really a simplify but a monoid instance. YConsider two display color attributes diffs. What display color attribute diff are these  equivalent to? :TODO(corey): not really a simplify but a monoid instance. 'Determines the diff between two display&6color attributes. This diff determines the operations + that actually get output to the terminal.   NoneXGeneric events. \Mouse buttons. Not yet used. `MModifier keys. Key codes are interpreted such that users are more likely to ; have Meta than Alt; for instance on the PC Linux console, b will / generally correspond to the physical Alt key. e&Representations of non-modifier keys. {CSet up the terminal for input. Returns a function which reads key ? events, and a function for shutting down the terminal access. ,XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{$XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{$ezyxwvutsrqponmlkjihgf`dcba\_^]X[ZY{ X[ZY\_^]`dcbaezyxwvutsrqponmlkjihgf{ Safe-Inferred|RRegion of the terminal that vty will output to. Units are columns not characters. |}~|}~|}~|}~None/Unspecified regions are filled with the picture'.s background pattern. The background pattern b can specify a character and a display attribute. If the display attribute used previously should ( be used for a background fill then use 1+ for the background attribute. This is the ' default background display attribute. t_odo The current attribute is always set to the default attributes at the start of updating the  screen to a picture. tHodo The background character *must* occupy a single column and no more. ^A picture can be configured either to not show the cursor or show the cursor at the specified  character position. \There is not a 1 to 1 map from character positions to a row and column on the screen due to * characters that take more than 1 column. \todo: The Cursor can be given a (character,row) offset outside of the visible bounds of the ; output region. In this case the cursor will not be shown. )The type of images to be displayed using update. & Can be constructed directly or using *. Which provides an initial instance with 8 reasonable defaults for pic_cursor and pic_background. _Create a picture for display for the given image. The picture will not have a displayed cursor . and the background display attribute will be 1. O  !"#$%&'()*+,-./012EFGHIJKLMNORSTUVW2FGHIJKELNMORSTUVWNone\This represents an operation on the terminal. Either an attribute change or the output of a  text string. Rtodo: This type may need to be restructured to increase sharing in the bytestring todo: Make foldable Va span of UTF-8 text occupies a specific number of screen space columns. A single UTF R character does not necessarially represent 1 colunm. See Codec.Binary.UTF8.Width " TextSpan [output width in columns] [number of characters] [data] ^vector of span operations. executed in succession. This represents the operations required to U render a row of the terminal. The operations in one row may effect subsequent rows. b EG: Setting the foreground color in one row will effect all subsequent rows until the foreground  color is changed. =vector of span operation vectors. One per row of the screen. OA picture is translated into a sequences of state changes and character spans. ` - State changes are currently limited to new attribute values. The attribute is applied to all e - following spans. Including spans of the next row. The nth element of the sequence represents the : - nth row (from top to bottom) of the picture to render.  - d - A span op sequence will be defined for all rows and columns (and no more) of the region provided & - with the picture to spans_for_pic.  - Z - todo: Partition attribute changes into multiple categories according to the serialized - - representation of the various attributes. 1Number of columns the DisplayOps are defined for .Number of rows the DisplayOps are defined for )The number of columns a SpanOps effects. (The width of a single SpanOp in columns Treturns the number of columns to the character at the given position in the span op _Produces the span ops that will render the given picture, possibly cropped or padded, into the  specified region. VBuilds a vector of row operations that will output the given picture to the terminal. #Crops to the given display region. YAdd the operations required to build a given image to the current set of row operations. OAdd a background fill of the given column width to the row display operations. [This has a fast path for background characters that are a single column and a single byte. a Otherwise this has to compute the width of the background character and replicate a sequence of & bytes to fill in the required width. 9snocs the operation to the operations for the given row. None[The cursor position is given in X,Y character offsets. Due to multi-column characters this 2 needs to be translated to column, row positions. ,Provide the bounds of the display context. 3Maximum number of colors supported by the context. ?Reset the display attributes to the default display attributes 1See Graphics.Vty.Terminal.XTermColor.inline_hack 6Text identifier for the terminal. Used for debugging. NClear the display and initialize the terminal to some initial display state. PThe expectation of a program is that the display starts in some initial state. 2 The initial state would consist of fixed values:  - cursor at top left  - UTF-8 character encoding , - drawing characteristics are the default \ The abstract operation I think all these behaviors are instances of is reserving exclusive  access to a display such that: , - The previous state cannot be determined ] - When exclusive access to a display is release the display returns to the previous state. 7Return the display to the state before reserve_display G If no previous state then set the display state to the initial state. $Returns the current display bounds. [Output the byte buffer of the specified size to the terminal device. The size is equal to  end_ptr - start_ptr Handle of output device ;The current terminal state. This may not exactly be known. 7An handle to a terminal that hides the implementation. *Initially we know nothing about a terminal' s state. ;Acquire display access to the given region of the display. Z Currently all regions have the upper left corner of (0,0) and the lower right corner at H (max display_width provided_width, max display_height provided_height) ZAll terminals serialize UTF8 text to the terminal device exactly as serialized in memory. ZAll terminals serialize UTF8 text to the terminal device exactly as serialized in memory. Displays 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. 9 The cursor is then shown and positioned or kept hidden. &todo: specify possible IO exceptions. / abstract from IO monad to a MonadIO instance. _Not all terminals support all display attributes. This filters a display attribute to what the  given terminal can display. 87 None)Set the background color to the provided  )Set the foreground color to the provided  Attempt to change the  of the following text. _If the terminal does not support the style change no error is produced. The style can still be  removed.  Attempt to remove the specified ) from the display of the following text. SThis will fail if apply_style for the given style has not been previously called. Reset the display attributes >Apply the provided display attribute changes to the terminal. This also flushes the  handle. None^The 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 6 - 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 V - display attributes are reset to defaults then the display attribute state is set.  - b - 3. If a mode is supposed to be applied but there is not an enter capability defined then then S - display attribute state is set if possible. Otherwise the mode is not applied.  - b - 4. If the display attribute state is being set then just update the arguments to that for any  - apply/remove.  - \Uses terminfo for all control codes. While this should provide the most compatible terminal e - terminfo does not support some features that would increase efficiency and improve compatibility: e - * determine the character encoding supported by the terminal. Should this be taken from the LANG  - environment variable? J - * Provide independent string capabilities for all display attributes.  -  - c - todo: Some display attributes like underline and bold have independent string capabilities that ) - should be used instead of the generic sgr string capability. `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. XThis takes a Color which clearly identifies which pallete to use and computes the index " into the full 256 color pallete. 5           None9A Mac terminal is assumed to be an xterm based terminal. )for Terminal.app the terminal identifier xterm0 is used. For iTerm.app the terminal identifier  xterm-256color is used. "This effects the terminfo lookup.  XTerminal.app requires the xterm-color smcup and rmcup caps. Not the generic xterm ones. 1 Otherwise, Terminal.app expects the xterm caps. !XTerminal.app requires the xterm-color smcup and rmcup caps. Not the generic xterm ones. 1 Otherwise, Terminal.app expects the xterm caps. "0iTerm needs a clear screen after smcup as well. #$%&'() !"*+ #$%&'() !"*+None,\An xterm color based terminal is some variant paired with a standard TerminfoBased terminal  interface. NFor the most part, xterm terminals just use the TerminfoBased implementation. -"Initialize the display to UTF-8. .(Output immediately followed by a flush. todo move out of this module. /;These sequences set xterm based terminals to UTF-8 output. t odo I don'5t know of a terminfo cap that is equivalent to this. 0;These sequences set xterm based terminals to UTF-8 output. t odo I don'5t know of a terminfo cap that is equivalent to this. 123,456-./078-123,456-./078NoneSReturns a TerminalHandle (an abstract Terminal instance) for the current terminal. TThe specific Terminal implementation used is hidden from the API user. All terminal c implementations are assumed to perform more, or less, the same. Currently all implementations use b terminfo for at least some terminal specific information. This is why platforms without terminfo a are not supported. However, as mentioned before, any specifics about it being based on terminfo _ are hidden from the API user. If a terminal implementation is developed for a terminal for a V platform without terminfo support then Vty should work as expected on that terminal. ,Selection of a terminal is done as follows:  If TERM == xterm ` then the terminal might be one of the Mac OS X .app terminals. Check if that might be ) the case and use MacOSX if so. $ otherwise use XTermColor. 1 for any other TERM value TerminfoBased is used. ZThe terminal has to be determined dynamically at runtime. To satisfy this requirement all ` terminals instances are lifted into an abstract terminal handle via existential qualification. U This implies that the only equations that can used are those in the terminal class. ]To differentiate between Mac OS X terminals this uses the TERM_PROGRAM environment variable. Z However, an xterm started by Terminal or iTerm *also* has TERM_PROGRAM defined since the " environment variable is not reset/>cleared by xterm. However a Terminal.app or iTerm.app started a from an xterm under X11 on mac os x will likely be done via open. Since this does not propogate _ environment variables (I think?) this assumes that XTERM_VERSION will never be set for a true $ Terminal.app or iTerm.app session. \The file descriptor used for output will a duplicate of the current stdout file descriptor. `todo: add an implementation for windows that does not depend on terminfo. Should be installable 5 with only what is provided in the haskell platform. Atodo: The Terminal interface does not provide any input support. >Sets the cursor position to the given output column and row. XThis is not necessarially the same as the character position with the same coordinates. : Characters can be a variable number of columns in width. aCurrently, the only way to set the cursor position to a given character coordinate is to specify O the coordinate in the Picture instance provided to output_picture or refresh. Hides the cursor Shows the cursor  None1The main object. At most one should be created. ` An alternative is to use unsafePerformIO to automatically create a singleton Vty instance when  required. _This does not assure any thread safety. In theory, as long as an update action is not executed . when another update action is already then it')s safe to call this on multiple threads. Wtodo: Once the Terminal interface encompasses input this interface will be deprecated. T Currently, just using the Terminal interface there is no support for input events. UOutputs the given Picture. Equivalent to output_picture applied to a display context  implicitly managed by Vty. -Get one Event object, blocking if necessary. &Handle to the terminal interface. See  /The use of Vty typically follows this process:   initialize vty 5 use the update equation of Vty to display a picture  repeat  shutdown vty. Utodo: provide a similar abstraction to Graphics.Vty.Terminal for input. Use haskeline's # input backend for implementation. todo: remove explicit  requirement. WRefresh the display. Normally the library takes care of refreshing. Nonetheless, some Y other program might output to the terminal and mess the display. In that case the user  might want to force a refresh. Clean up after vty. O The above methods will throw an exception if executed after this is executed. KSet up the state object for using vty. At most one state object should be  created at a time. KSet up the state object for using vty. At most one state object should be _ created at a time. The delay, in microseconds, specifies the period of time to wait for a key c following reading ESC from the terminal before considering the ESC key press as a discrete event. 9  !"#$%&'()*+,-./012EFGHIJKLMNORSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz|}~,ezyxwvutsrqponmlkjihgf`dcba\_^]X[ZY9: !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                        !"!#!$!%!&!'()(*(+(,(-(.(/(0(1(2(3(4(5(6(7(8(9(:(;(<=>=?=@=A=B=C=D=E=F=GHIHJHKHLHMHNHOHPHQRSTUTVTWTXTYZ[Z\Z]Z^Z_Z`Za b c d e f g h i j klmlnlolplqlrlsltlu v w x y z { | } ~                                                       !"#$%&'()*+,-./0  1234,-5467  1582,9 :; vty-4.7.3Codec.Binary.UTF8.WidthGraphics.Vty.AttributesGraphics.Vty.ImageGraphics.Vty.LLInputGraphics.Vty.DisplayRegionGraphics.Vty.PictureGraphics.Vty.TerminalGraphics.Vty.Inline Graphics.VtyData.Terminfo.ParseData.MarshallingData.Terminfo.EvalGraphics.Vty.DisplayAttributesGraphics.Vty.SpanGraphics.Vty.Terminal.Generic#Graphics.Vty.Terminal.TerminfoBasedGraphics.Vty.Terminal.MacOSX Graphics.Vty.Terminal.XTermColorwcwidthwcswidthStyleColorColor240ISOColor MaybeDefaultSetTo KeepCurrentDefault FixedAttr fixed_stylefixed_fore_colorfixed_back_colorAttr attr_styleattr_fore_colorattr_back_colorblackredgreenyellowbluemagentacyanwhite bright_black bright_red bright_green bright_yellow bright_bluebright_magenta bright_cyan bright_whitestandout underline reverse_videoblinkdimbolddefault_style_mask style_mask has_stylewith_fore_colorwith_back_color with_styledef_attr current_attrImageImagePad ImageCrop Translation EmptyImageBGFillVertJoinpart_top part_bottom HorizJoin part_left part_right output_height HorizTextattrtext output_width char_width DisplayStringbackground_fill image_width image_height<|><-> horiz_catvert_catchariso_10646_stringstring utf8_string safe_wcwidth safe_wcswidthutf8_bytestring char_fill empty_image translatecroppadEventEvResizeEvMouseEvKeyButtonBRightBMiddleBLeftModifierMAltMMetaMCtrlMShiftKeyKEnterKRightKDownKLeftKMenuKUpKNP5KBegin KPageDownKEndKDelKPageUpKHomeKInsKBSKASCIIKPauseKPrtScrKBackTabKFunKEsc initTermInput DisplayRegion region_width region_height Backgroundbackground_charbackground_attrCursorNoCursorPicture pic_cursor pic_imagepic_background pic_for_image DisplayHandleTerminal terminal_IDrelease_terminalreserve_displayrelease_displaydisplay_boundsdisplay_terminal_instanceoutput_byte_buffer output_handleTerminalHandledisplay_contextoutput_pictureInlineM back_color fore_color apply_style remove_style default_allput_attr_changeterminal_handleset_cursor_pos hide_cursor show_cursorVtyupdate next_eventterminalrefreshshutdownmkVty mkVtyEscDelay BuildResultsout_param_count out_cap_ops out_param_ops BuildState next_offset CapParserParamOp IncFirstTwoParamOpsCapOp CompareGt CompareLt CompareEq ArithMinus ArithPlus BitwiseAnd BitwiseXOr BitwiseOr Conditionalconditional_exprconditional_parts PushValue PushParamCharOutDecOutBytesCapOpsCapParam CapExpressioncap_ops cap_bytes source_string param_count param_opsCapBytesparse_cap_expressionconstruct_cap_expressioncap_expression_parserparam_escape_parserliteral_percent_parserparam_op_parserincrement_op_parserpush_op_parserdec_out_parserchar_out_parserconditional_op_parserconditional_true_parserconditional_false_parserconditional_end_parserbitwise_op_parserbitwise_or_parserbitwise_and_parserbitwise_xor_parserarith_op_parserliteral_int_op_parsercompare_op_parserbytes_op_parserchar_const_parser inc_offsetinitial_build_state$fMonoidBuildResults$fNFDataParamOp $fNFDataCapOp$fNFDataCapExpression parsec-3.1.3Text.Parsec.Error ParseError OutputBufferstring_to_bytesserialize_bytesghc-prim GHC.TypesWordbaseGHC.WordWord8Word16Word32Word64GHC.PtrPtrFunPtrGHC.ForeignPtr ForeignPtrForeign.MarshalunsafeLocalStateForeign.Marshal.PoolpooledNewArray0pooledNewArray pooledNewpooledReallocArray0pooledReallocArraypooledMallocArray0pooledMallocArraypooledReallocBytes pooledReallocpooledMallocBytes pooledMallocwithPoolfreePoolnewPoolPoolForeign.Marshal.Errorvoid throwIfNull throwIfNeg_ throwIfNegthrowIf_throwIfForeign.Marshal.Array advancePtr lengthArray0 moveArray copyArray withArrayLen0 withArray0 withArrayLen withArray newArray0newArray pokeArray0 pokeArray peekArray0 peekArray reallocArray0 reallocArray allocaArray0 allocaArray mallocArray0 mallocArrayForeign.Marshal.Utils moveBytes copyByteswithMany maybePeek maybeWithmaybeNewtoBoolfromBoolwithnewForeign.Marshal.Allocfree reallocBytesreallocallocaBytesAligned allocaBytesalloca mallocBytesmalloc finalizerFreeForeign.ForeignPtrunsafeForeignPtrToPtrForeign.ForeignPtr.ImpmallocForeignPtrArray0mallocForeignPtrArraynewForeignPtrEnvwithForeignPtr newForeignPtr Foreign.Ptr intPtrToPtr ptrToIntPtr wordPtrToPtr ptrToWordPtrfreeHaskellFunPtrWordPtrIntPtrfinalizeForeignPtrcastForeignPtrtouchForeignPtrnewForeignPtr_addForeignPtrFinalizerEnvaddForeignPtrFinalizermallocForeignPtrBytesmallocForeignPtr FinalizerPtrFinalizerEnvPtrForeign.Storablepokepeek pokeByteOff peekByteOff pokeElemOff peekElemOff alignmentsizeOfStorablecastPtrToFunPtrcastFunPtrToPtr castFunPtr nullFunPtrminusPtralignPtrplusPtrcastPtrnullPtr EvalStateEvalEvalT eval_stackeval_expression eval_paramspop read_parampushapply_param_opsapply_param_opcap_expression_required_bytescap_ops_required_bytescap_op_required_bytesserialize_cap_expressionserialize_cap_opsserialize_cap_op wcswidth'wcwidth'$fMonoidMaybeDefault $fMonoidAttr $fMonoidImage horiz_text horiz_join vert_join $fShowImageStyleStateChangeDisplayColorDiffDisplayAttrDifffix_display_attrsimplify_style_diffssimplify_color_diffsdisplay_attr_diffs RemoveBold ApplyBold RemoveDimApplyDim RemoveBlink ApplyBlinkRemoveReverseVideoApplyReverseVideoRemoveUnderlineApplyUnderlineRemoveStandout ApplyStandoutSetColor NoColorChangeColorToDefault style_diffsfore_color_diffback_color_diff diff_color diff_styles$fMonoidDisplayAttrDiffKClassMisPfxPrefixInvalidValidset_term_timingfirst utf8Length $fShowPictureSpanOpTextSpanSpanOpsRowOps DisplayOpsspan_ops_columns span_ops_rowsspan_ops_effected_columnsspan_op_has_widthcolumns_to_char_offset spans_for_pic build_spansrow_ops_for_image snoc_bg_fillsnoc_opAttributeChangeMSpanOpsMRowOpseffected_region display_opssnoc_text_span $fShowSpanOp$fShowDisplayOpsCursorOutputMapcontext_regioncontext_color_countdefault_attr_required_bytes inline_hack TerminalStateinitial_terminal_stateutf8_text_required_bytesserialize_utf8_textlimit_attr_for_displaychar_to_output_posDisplayTerminalmove_cursor_required_bytesserialize_move_cursorshow_cursor_required_bytesserialize_show_cursorhide_cursor_required_bytesserialize_hide_cursorattr_required_bytesserialize_set_attrserialize_default_attr DisplayStateprevious_output_ref known_fattr state_refnew_terminal_handleinitial_display_staterequired_bytesspan_ops_required_bytesspan_op_required_bytesserialize_output_opsserialize_span_opsserialize_span_opmarshall_to_terminalcursor_output_mapcursor_column_offset$fDisplayTerminalDisplayHandle$fTerminalTerminalHandleGHC.IO.Handle.FDstdoutDisplayAttrSeqterminal_instanceansi_color_indexDisplayAttrStateapply_standoutapply_underlineapply_reverse_video apply_blink apply_dim apply_boldSetState EnterExitSeqDisplayContextboundstermsupported_colorsDisplayAttrCapsset_attr_statesenter_standout exit_standoutenter_underlineexit_underlineenter_reverse_videoenter_dim_modeenter_bold_modeTerm term_info_ID term_infosmcuprmcupcupcnormcivisset_fore_colorset_back_colorset_default_attr clear_screendisplay_attr_caps term_handlec_get_window_sizemarshall_cap_to_terminalcurrent_display_attr_capsget_window_sizesgr_args_for_statereq_display_cap_seq_forstate_for_stylestyle_to_apply_seq$fDisplayTerminalDisplayContext$fTerminalTerm smcup_str rmcup_strclear_screen_str super_display super_termterm_app flushed_put XTermColorset_utf8_char_setset_default_char_set xterm_variant$fTerminalXTermColorintMkVty