úÎTcMõ5      !"#$%&'()*+,-./01234portable experimental"Hans Hoglund <hans@hanshoglund.se> Safe-Inferred7Rendering mode. All on one line &No indentation, infinitely long lines With zig-zag cuts Normal A printing style. The printing mode Length of line, in chars &Ratio of ribbon length to line length 5The TextDetails data type ;A TextDetails represents a fragment of string that will be  output at some point. 6A whole String fragment 7A single Char fragment 8RPrinter is a reduced Printer6, guaranteed not to have a top-level Above or Beside. The abstract type of printers. _Class of types that can be pretty-printed. The Pretty class is similar to 9, but converts values to   s instead  of StringsK. A printer is essentially a string with some extra structural information ! such as length and indentation. JNote that the instances for primitive types, lists and tuples all satisfy  (show . pretty) x == show x &Return a printer for the given value. DThe method prettyList is provided to allow the programmer to give a M specialised way of printing lists of values. For example, this is used by P the predefined Pretty instance of the Char type, where values of type String N should be shown in double quotes, rather than between square brackets. AA printer of height and width 1, containing a literal character. 3A printer of height 1 containing a literal string.   satisfies the following laws:   s :  t =  (s;t)  "" : x = x, if x non-empty 8The side condition on the last law is necessary because  ""  has height 1, while  has no height. Some string with any width. (!string s = sizedText (length s) s) @Some string, but without any width. Use for non-printing string  such as a HTML or Latex tags 0The empty printer, with no height and no width.   is the identity for :, ', $ and %, and anywhere  in the argument list for (, ,  , !, * etc. Returns < if the printer is empty &Wrap printer in the given characters. Wrap printer in '...' Wrap printer in "..." Wrap printer in (...) Wrap printer in [...] Wrap printer in {...} =*Perform some simplification of a built up Printer. List version of :. List version of '. !List version of $. ":Nest (or indent) a printer by a given number of positions  (which may also be negative). " satisfies the laws:  " 0 x = x " k (" k' x) = " (k+k') x " k (x : y) = " k z : " k y " k (x $ y) = " k x $ " k y " k  =  x : " k y = x : y, if x non-empty 5The side condition on the last law is needed because   is a left identity for :. # !hang d1 n d2 = sep [d1, nest n d2]$@Above, except that if the last line of the first argument stops C at least one position before the first line of the second begins, / these two lines are overlapped. For example:  , string "hi" </> nest 5 (string "there")  lays out as   hi there  rather than   hi  there $ is associative, with identity , and also satisfies  (x $ y) : z = x $ (y : z), if y non-empty. %Above, with no overlapping.  % is associative, with identity . &Beside.  : is associative, with identity . ';Beside, separated by space, unless one of the arguments is .  ' is associative, with identity . (Either   or !. )Either  or !. *"Paragraph fill" version of ). +"Paragraph fill" version of (. ,Join with separator. 1 sepBy q [x1,x2..xn] = x1 <> q <> x2 <> q .. xn. -Join with initiator. 7 initBy q [x1,x2..xn] = q <> x1 <> q <> x2 <> q .. xn. .Join with terminator. 7 termBy q [x1,x2..xn] = x1 <> q <> x2 <> q .. xn <> q. /'Join with separator followed by space. 6 sepByS q [x1,x2..xn] = x1 <> q <+> x2 <> q <+>.. xn. 0'Join with initiator followed by space. > initByS q [x1,x2..xn] = q <+> x1 <> q <+> x2 <> q <+> .. xn. 1(Join with terminator followed by space. = termByS q [x1,x2..xn] = x1 <> q <+> x2 <> q <+> .. xn <> q. >firstF returns its first argument if it is non-empty, otherwise its second. 2The default style (1mode=PageMode, lineLength=100, ribbonsPerLine=1.5). 3 Render the Printer to a String using the default Style. 4 Render the Printer to a String using the given Style. ?Default TextDetails printer @ The general printing interface. z 5678 ABCDEFGH IJKLMN= !"#OPQRSTUVW$%XYZ[&'\]^()_`a*+bcdef,-./01ghij>kl234?@Rendering mode  Line length Ribbons per line What to do with string What to do at the end  The printer Result mnopqrstuvwxyz{|}5  !"#$%&'()*+,-./012345 &' $%!()+*"#,-./013 24f 5768 HGFEDCBA  IJKLMN= !"#OPQRSTUVW$%XYZ[&'\]^()_`a*+bcdef,-./01ghij>kl234?@mnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…† prettify-1.0 Text.PrettyMode OneLineModeLeftMode ZigZagModePageModeStylemode lineLengthribbonsPerLinePrinterPrettypretty prettyListintintegerfloatdoublerationalcharstring sizedText zeroWidthTextemptyisEmptywrapquotes doubleQuotesparensbracketsbraceshcathsepvcatnesthang<-><+>sepcatfcatfsepsepByinitBytermBysepBySinitByStermBySstyle runPrinterrunPrinterStyle TextDetailsStrChrRPrinterbaseGHC.ShowShowsemigroups-0.9.2Data.Semigroup<>GHC.Base++ghc-prim GHC.TypesTrue reducePrinterfirst txtPrinter runPrinter'AboveBeside NoPrinterUnionNest TextBesideNilAboveEmptylistchar'string'indent space_string nl_stringmkNestmkUnionbeside_'above_'reduceAB nilAbove_ stringBeside_nest_union_above_above aboveNest nilAboveNestbeside_beside nilBesidesepXsep1sepNBfillfill1fillNBfillNBE elideNestbestnicestnicest1fits nonEmptySetoneLiner easy_displaydisplay $fShowPrinter$fIsStringPrinter$fMonoidPrinter$fSemigroupPrinter $fPrettyRatio $fPrettyMaybe $fPretty[] $fPretty(,)$fPrettyInteger $fPrettyChar$fPrettyDouble $fPrettyFloat $fPrettyInt $fPretty()$fPrettyPrinter