!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NoneAThe TextSpec bundles together the styles for the 8 and 256 color ? terminals, so that the text can be portrayed on any terminal. @Describes text appearance (foreground and background colors, as B well as other attributes such as bold) for a 256 color terminal. @Describes text appearance (foreground and background colors, as A well as other attributes such as bold) for an 8 color terminal. 2Style elements that apply in both 8 and 256 color E terminals. However, the elements are described separately for 8 and = 256 color terminals, so that the text appearance can change . depending on how many colors a terminal has. L@A chunk is some textual data coupled with a description of what : color the text is, attributes like whether it is bold or A underlined, etc. The chunk knows what foreground and background D colors and what attributes to use for both an 8 color terminal and B a 256 color terminal. To change these attributes and colors, you  must make a new chunk. =There is no way to combine chunks. To print large numbers of ? chunks, lazily build a list of them and then print them using  i. O)Foreground color in a 256 color setting. R(Foreground color in an 8 color setting. U)Background color in a 256 color setting. X(Background color in an 8 color setting. [AUseful if you want to inspect the text in a Chunk and then build " a new Chunk with different text. $ {-# LANGUAGE OverloadedStrings #-}  import Data.Text (append)  helloDolly :: Chunk ? helloDolly = plain "Hello" +.+ ChangeText (`append` " Dolly") ^>A Mod is anything capable of modifying a Chunk. Usually these D will modify the TextSpec, though a few Mod instead modify the Text 0 itself. Typically you will create a Chunk with g and then use  e4 repeatedly to modify the Chunk to suit your needs. `"Which terminal definition to use. a?Use the terminal with this given name. You might get this from @ the TERM environment variable, or set it explicitly. A runtime < error will result if the terminfo database does not have a = definition for this terminal. If this terminal supports 256 B colors, then 256 colors are used. If this terminal supports less ; than 256 colors, but at least 8 colors, then 8 colors are & used. Otherwise, no colors are used. b?Using this terminal should always succeed. This suppresses all C colors. Uesful if output is not going to a TTY, or if you just do  not like colors. c:Gets the terminal definition from the environment. If the 0 environment does not have a TERM veriable, use b. d@Gets the terminal definition from the environment. If the first < argument is True, the terminal is always obtained from the E environment. If it is False, the terminal is only obtained from the D environment if the given handle is not a terminal; otherwise, Dumb  is returned. e1Applies a modifier to a Chunk. Left associative. f>Composes modifiers. Useful to build up a single function that D modifies a Chunk. You might use this to build up several modifiers A and use them repeatedly, or you might write an API that expects  functions of type Chunk -> Chunk and then you could use f to * build those functions. Left associative. $ redBoldUnderline :: Chunk -> Chunk 8 redBoldUnderline = id .+. f_red .+. bold .+. underline g=Makes a plain Chunk; that is, one that has no effects and is @ printed in the default foreground and background color for the C terminal. Modify this chunk so that it has the colors and effects  that you want. hASends a list of chunks to the given handle for printing. Sets up B the terminal (this only needs to be done once.) Lazily processes  the list of Chunk. See i for notes on how many colors  are used. i@Sends a list of chunks to standard output for printing. Sets up B the terminal (this only needs to be done once.) Lazily processes  the list of Chunk. 'Which colors are used depends upon the ` . If it is b, + then no colors are used on output. If the ` is specified with  a:, the UNIX terminfo library is used to determine how many C colors the terminal supports. If it supports at least 256 colors, E then 256 colors are used. If it supports at least 8 colors but less E than 256 colors, then 256 colors are used. Otherwise, no colors are ) used. A runtime error will occur if the a is not found in  the system terminal database. 8Has all bold, flash, underline, and inverse turned off. ?Uses the default terminal colors (which will vary depending on  the terminal). ?Uses the default terminal colors (which will vary depending on  the terminal). AA TextSpec with the default colors on 8 and 256 color terminals, ! with all attributes turned off. :Gets the right set of terminal codes to apply the desired < highlighting, bold, underlining, etc. Be sure to apply the 8 attributes first (bold, underlining, etc) and then the C colors. Setting the colors first and then the attributes seems to ( reset the colors, giving blank output. ?When used as a modifier, a Text will replace the text within a  Chunk with new text. $ {-# LANGUAGE OverloadedStrings #-}  goodbyeWorld :: Chunk : goodbyeWorld = plain "Hello world!" +.+ "Goodbye world!"   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd9Use True if the user always wants to see colors, even if : standard output is not a terminal. Otherwise, use False. <Check this handle to see if it is a terminal (typically you  will use stdout). efghijklmnopqrstuvwxyTurn on  Turn off z{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~`bacdLMNgih^_[\]fez{|}~jklmnopqrstuvwxy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ MN=>?:;<789456123./0+,-()*%&'"#$ !IJKFGHCDE@ABXYZUVWRSTOPQ   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bacdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~         !""#$$%&&'(()**+,,-../00122344566789:;;<==>??@AABCCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~8rainbow-0.2.0.0System.Console.RainbowTextSpecstyle8style256Style256 foreground256 background256 common256Style8 foreground8 background8common8 StyleCommonscBold scUnderlinescFlash scInverse BackgroundAllba8ba256 ForegroundAllfa8fa256 InverseAll unInverseAllFlashAll unFlashAll UnderlineAllunUnderlineAllBoldAll unBoldAll Inverse256 unInverse256Flash256 unFlash256 Underline256unUnderline256Bold256 unBold256Inverse8 unInverse8Flash8unFlash8 Underline8 unUnderline8Bold8unBold8Inverse unInverseFlashunFlash Underline unUnderlineBoldunBoldChunk chunkTextSpec chunkText Foreground256unForeground256 Foreground8 unForeground8 Background256unBackground256 Background8 unBackground8 ChangeText unChangeTextMod changeChunkTermTermNameDumb termFromEnvsmartTermFromEnv+.+.+.plain hPrintChunks printChunksbold8bold8off underline8 underline8offflash8 flash8offinverse8 inverse8offbold256 bold256off underline256underline256offflash256 flash256off inverse256 inverse256offboldboldOff underline underlineOffflashflashOffinverse inverseOff f_defaultf_blackf_redf_greenf_yellowf_blue f_magentaf_cyanf_white b_defaultb_blackb_redb_greenb_yellowb_blue b_magentab_cyanb_whitedefaultStyleCommon defaultStyle8defaultStyle256defaultTextSpeccolor8_f_defaultcolor8_f_black color8_f_redcolor8_f_greencolor8_f_yellow color8_f_bluecolor8_f_magenta color8_f_cyancolor8_f_whitecolor8_b_defaultcolor8_b_black color8_b_redcolor8_b_greencolor8_b_yellow color8_b_bluecolor8_b_magenta color8_b_cyancolor8_b_whitecolor256_f_default color256_f_0color256_f_black color256_f_1color256_f_red color256_f_2color256_f_green color256_f_3color256_f_yellow color256_f_4color256_f_blue color256_f_5color256_f_magenta color256_f_6color256_f_cyan color256_f_7color256_f_white color256_f_8color256_f_grey color256_f_9color256_f_red_bright color256_f_10color256_f_green_bright color256_f_11color256_f_yellow_bright color256_f_12color256_f_blue_bright color256_f_13color256_f_magenta_bright color256_f_14color256_f_cyan_bright color256_f_15color256_f_white_bright color256_f_16 color256_f_17 color256_f_18 color256_f_19 color256_f_20 color256_f_21 color256_f_22 color256_f_23 color256_f_24 color256_f_25 color256_f_26 color256_f_27 color256_f_28 color256_f_29 color256_f_30 color256_f_31 color256_f_32 color256_f_33 color256_f_34 color256_f_35 color256_f_36 color256_f_37 color256_f_38 color256_f_39 color256_f_40 color256_f_41 color256_f_42 color256_f_43 color256_f_44 color256_f_45 color256_f_46 color256_f_47 color256_f_48 color256_f_49 color256_f_50 color256_f_51 color256_f_52 color256_f_53 color256_f_54 color256_f_55 color256_f_56 color256_f_57 color256_f_58 color256_f_59 color256_f_60 color256_f_61 color256_f_62 color256_f_63 color256_f_64 color256_f_65 color256_f_66 color256_f_67 color256_f_68 color256_f_69 color256_f_70 color256_f_71 color256_f_72 color256_f_73 color256_f_74 color256_f_75 color256_f_76 color256_f_77 color256_f_78 color256_f_79 color256_f_80 color256_f_81 color256_f_82 color256_f_83 color256_f_84 color256_f_85 color256_f_86 color256_f_87 color256_f_88 color256_f_89 color256_f_90 color256_f_91 color256_f_92 color256_f_93 color256_f_94 color256_f_95 color256_f_96 color256_f_97 color256_f_98 color256_f_99color256_f_100color256_f_101color256_f_102color256_f_103color256_f_104color256_f_105color256_f_106color256_f_107color256_f_108color256_f_109color256_f_110color256_f_111color256_f_112color256_f_113color256_f_114color256_f_115color256_f_116color256_f_117color256_f_118color256_f_119color256_f_120color256_f_121color256_f_122color256_f_123color256_f_124color256_f_125color256_f_126color256_f_127color256_f_128color256_f_129color256_f_130color256_f_131color256_f_132color256_f_133color256_f_134color256_f_135color256_f_136color256_f_137color256_f_138color256_f_139color256_f_140color256_f_141color256_f_142color256_f_143color256_f_144color256_f_145color256_f_146color256_f_147color256_f_148color256_f_149color256_f_150color256_f_151color256_f_152color256_f_153color256_f_154color256_f_155color256_f_156color256_f_157color256_f_158color256_f_159color256_f_160color256_f_161color256_f_162color256_f_163color256_f_164color256_f_165color256_f_166color256_f_167color256_f_168color256_f_169color256_f_170color256_f_171color256_f_172color256_f_173color256_f_174color256_f_175color256_f_176color256_f_177color256_f_178color256_f_179color256_f_180color256_f_181color256_f_182color256_f_183color256_f_184color256_f_185color256_f_186color256_f_187color256_f_188color256_f_189color256_f_190color256_f_191color256_f_192color256_f_193color256_f_194color256_f_195color256_f_196color256_f_197color256_f_198color256_f_199color256_f_200color256_f_201color256_f_202color256_f_203color256_f_204color256_f_205color256_f_206color256_f_207color256_f_208color256_f_209color256_f_210color256_f_211color256_f_212color256_f_213color256_f_214color256_f_215color256_f_216color256_f_217color256_f_218color256_f_219color256_f_220color256_f_221color256_f_222color256_f_223color256_f_224color256_f_225color256_f_226color256_f_227color256_f_228color256_f_229color256_f_230color256_f_231color256_f_232color256_f_233color256_f_234color256_f_235color256_f_236color256_f_237color256_f_238color256_f_239color256_f_240color256_f_241color256_f_242color256_f_243color256_f_244color256_f_245color256_f_246color256_f_247color256_f_248color256_f_249color256_f_250color256_f_251color256_f_252color256_f_253color256_f_254color256_f_255color256_b_default color256_b_0color256_b_black color256_b_1color256_b_red color256_b_2color256_b_green color256_b_3color256_b_yellow color256_b_4color256_b_blue color256_b_5color256_b_magenta color256_b_6color256_b_cyan color256_b_7color256_b_white color256_b_8color256_b_grey color256_b_9color256_b_red_bright color256_b_10color256_b_green_bright color256_b_11color256_b_yellow_bright color256_b_12color256_b_blue_bright color256_b_13color256_b_magenta_bright color256_b_14color256_b_cyan_bright color256_b_15color256_b_white_bright color256_b_16 color256_b_17 color256_b_18 color256_b_19 color256_b_20 color256_b_21 color256_b_22 color256_b_23 color256_b_24 color256_b_25 color256_b_26 color256_b_27 color256_b_28 color256_b_29 color256_b_30 color256_b_31 color256_b_32 color256_b_33 color256_b_34 color256_b_35 color256_b_36 color256_b_37 color256_b_38 color256_b_39 color256_b_40 color256_b_41 color256_b_42 color256_b_43 color256_b_44 color256_b_45 color256_b_46 color256_b_47 color256_b_48 color256_b_49 color256_b_50 color256_b_51 color256_b_52 color256_b_53 color256_b_54 color256_b_55 color256_b_56 color256_b_57 color256_b_58 color256_b_59 color256_b_60 color256_b_61 color256_b_62 color256_b_63 color256_b_64 color256_b_65 color256_b_66 color256_b_67 color256_b_68 color256_b_69 color256_b_70 color256_b_71 color256_b_72 color256_b_73 color256_b_74 color256_b_75 color256_b_76 color256_b_77 color256_b_78 color256_b_79 color256_b_80 color256_b_81 color256_b_82 color256_b_83 color256_b_84 color256_b_85 color256_b_86 color256_b_87 color256_b_88 color256_b_89 color256_b_90 color256_b_91 color256_b_92 color256_b_93 color256_b_94 color256_b_95 color256_b_96 color256_b_97 color256_b_98 color256_b_99color256_b_100color256_b_101color256_b_102color256_b_103color256_b_104color256_b_105color256_b_106color256_b_107color256_b_108color256_b_109color256_b_110color256_b_111color256_b_112color256_b_113color256_b_114color256_b_115color256_b_116color256_b_117color256_b_118color256_b_119color256_b_120color256_b_121color256_b_122color256_b_123color256_b_124color256_b_125color256_b_126color256_b_127color256_b_128color256_b_129color256_b_130color256_b_131color256_b_132color256_b_133color256_b_134color256_b_135color256_b_136color256_b_137color256_b_138color256_b_139color256_b_140color256_b_141color256_b_142color256_b_143color256_b_144color256_b_145color256_b_146color256_b_147color256_b_148color256_b_149color256_b_150color256_b_151color256_b_152color256_b_153color256_b_154color256_b_155color256_b_156color256_b_157color256_b_158color256_b_159color256_b_160color256_b_161color256_b_162color256_b_163color256_b_164color256_b_165color256_b_166color256_b_167color256_b_168color256_b_169color256_b_170color256_b_171color256_b_172color256_b_173color256_b_174color256_b_175color256_b_176color256_b_177color256_b_178color256_b_179color256_b_180color256_b_181color256_b_182color256_b_183color256_b_184color256_b_185color256_b_186color256_b_187color256_b_188color256_b_189color256_b_190color256_b_191color256_b_192color256_b_193color256_b_194color256_b_195color256_b_196color256_b_197color256_b_198color256_b_199color256_b_200color256_b_201color256_b_202color256_b_203color256_b_204color256_b_205color256_b_206color256_b_207color256_b_208color256_b_209color256_b_210color256_b_211color256_b_212color256_b_213color256_b_214color256_b_215color256_b_216color256_b_217color256_b_218color256_b_219color256_b_220color256_b_221color256_b_222color256_b_223color256_b_224color256_b_225color256_b_226color256_b_227color256_b_228color256_b_229color256_b_230color256_b_231color256_b_232color256_b_233color256_b_234color256_b_235color256_b_236color256_b_237color256_b_238color256_b_239color256_b_240color256_b_241color256_b_242color256_b_243color256_b_244color256_b_245color256_b_246color256_b_247color256_b_248color256_b_249color256_b_250color256_b_251color256_b_252color256_b_253color256_b_254color256_b_255 getTermCodes $fModText hPrintChunk defaultColorsdoAll commonAttrs$fModBackgroundAll$fModForegroundAll$fModInverseAll $fModFlashAll$fModUnderlineAll $fModBoldAll$fModInverse256 $fModFlash256$fModUnderline256 $fModBold256 $fModInverse8 $fModFlash8$fModUnderline8 $fModBold8$fModForeground256$fModForeground8$fModBackground256$fModBackground8$fModChangeText