!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*(c) Trevor Elliott <revor@galois.com> 2015 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe08+Current offset from the end of the documentCurrently open spansCollected annotation regionsCollected outputRendering mode.NormalWith zig-zag cuts%No indentation, infinitely long lines All on one line A rendering style. The rendering mode Length of line, in chars%Ratio of line length to ribbon lengthThe TextDetails data typeOA TextDetails represents a fragment of text that will be output at some point.A single Char fragmentA whole String fragmentgUsed to represent a Fast String fragment but now deprecated and identical to the Str constructor.MRDoc is a "reduced GDoc", guaranteed not to have a top-level Above or Beside.The abstract type of documents. A Doc represents a *set* of layouts. A Doc with no occurrences of Union or NoDoc represents just one layout.#Attach an annotation to a document.AA document of height and width 1, containing a literal character.5A document of height 1 containing a literal string.  satisfies the following laws:  s C  t =  (st) "" C x = x, if x non-empty8The side condition on the last law is necessary because  "" has height 1, while  has no height.Same as text". Used to be used for Bytestrings.Some text with any width. (text s = sizedText (length s) s)YSome text, but without any width. Use for non-printing text such as a HTML or Latex tags2The empty document, with no height and no width.  is the identity for C, D, A and B), and anywhere in the argument list for E, ;, <, =, G etc.Returns  if the document is empty3Produce spacing for indenting the amount specified.Aan old version inserted tabs being 8 columns apart in the output.5Apply 2 to  if boolean is true.6Apply 3 to  if boolean is true.7Apply 4 to  if boolean is true.8Apply 0 to  if boolean is true.9Apply 1 to  if boolean is true.:*Perform some simplification of a built up GDoc.;List version of C.<List version of D.=List version of A.>[Nest (or indent) a document 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 C y) = > k z C > k y > k (x A y) = > k x A > k y > k  = x C > k y = x C y, if x non-empty6The side condition on the last law is needed because  is a left identity for C.? "hang d1 n d2 = sep [d1, nest n d2]@ @punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]AAbove, except that if the last line of the first argument stops at least one position before the first line of the second begins, these two lines are overlapped. For example: % text "hi" $$ nest 5 (text "there") lays out as  hi there rather than  hi thereA is associative, with identity , and also satisfies(x A y) C z = x A (y C z), if y non-empty.BAbove, with no overlapping. B is associative, with identity .C Beside. C is associative, with identity .D;Beside, separated by space, unless one of the arguments is . D is associative, with identity .EEither < or =.FEither ; or =.G"Paragraph fill" version of F.H"Paragraph fill" version of E.IfirstE returns its first argument if it is non-empty, otherwise its second.JThe default style (1mode=PageMode, lineLength=100, ribbonsPerLine=1.5).K Render the Doc to a String using the default Style.L Render the Doc to a String using the given Style.Default TextDetails printerM The general rendering interface.PURender out a String, interpreting the annotations as part of the resulting document.IMPORTANT: the size of the annotation string does NOT figure into the layout of the document, so the document will lay out as though the annotations are not present.QRender a document with annotations, by interpreting the start and end of the annotations, as well as the text details in the context of a monad.  A ';' character!A ',' character"A : character#A space character$A '=' character%A '(' character&A ')' character'A '[' character(A ']' character)A '{' character*A '}' character+ int n = text (show n), integer n = text (show n)- float n = text (show n). double n = text (show n)/ rational n = text (show n)0Wrap document in '...'1Wrap document in "..."2Wrap document in (...)3Wrap document in [...]4Wrap document in {...}56789:;<=>?@ABCDEFGHIJKLMRendering mode Line lengthRibbons per lineWhat to do with textWhat to do at the end The documentResultNRendering mode Line lengthRibbons per lineWhat to do with textWhat to do at the end The documentResultOPStarting an annotationEnding an annotationQStarting an annotationEnding an annotationText formatting Document endR  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR+,-./ !"#$%&'()*2340156789CD;<AB=EFHG>?@I:KOPQ JL MNr   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQABCD*(c) Trevor Elliott <revor@galois.com> 2015 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe0RPPretty printing class. The precedence level is used in a similar way as in the . class. Minimal complete definition is either S or T.VKLevel of detail in the pretty printed output. Level 0 is the least detail.X!The "normal" (Level 0) of detail.YPretty print a value with the X level.Z-Parenthesize an value if the boolean is true.RSTUVWXYZ[  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ RSTUVWXYZRSTUVWXYZ*(c) Trevor Elliott <revor@galois.com> 2015 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe0E  !"#$%&'()*+,-./01234;<=>?@ABCDEFGHJKLMNOE+,-./ !"#$%&'()*23401CD;<AB=EFHG>?@KO JLMN "(c) The University of Glasgow 2001 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe0"NRDoc is a "reduced GDoc", guaranteed not to have a top-level Above or Beside.[The abstract type of documents. A Doc represents a *set* of layouts. A Doc with no occurrences of Union or NoDoc represents just one layout.\AA document of height and width 1, containing a literal character.]5A document of height 1 containing a literal string. ] satisfies the following laws: ] s  ] t = ] (st)] ""  x = x, if x non-empty8The side condition on the last law is necessary because ] "" has height 1, while a has no height.^Same as text". Used to be used for Bytestrings._Some text with any width. (text s = sizedText (length s) s)`YSome text, but without any width. Use for non-printing text such as a HTML or Latex tagsa2The empty document, with no height and no width. a is the identity for , ,  and ), and anywhere in the argument list for , ~, , ,  etc.bReturns  if the document is emptyxApply u to [ if boolean is true.yApply v to [ if boolean is true.zApply w to [ if boolean is true.{Apply s to [ if boolean is true.|Apply t to [ if boolean is true.}*Perform some simplification of a built up GDoc.~List version of .List version of .List version of .[Nest (or indent) a document 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 a = ax   k y = x  y, if x non-empty6The side condition on the last law is needed because a is a left identity for . "hang d1 n d2 = sep [d1, nest n d2] @punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]Above, except that if the last line of the first argument stops at least one position before the first line of the second begins, these two lines are overlapped. For example: % text "hi" $$ nest 5 (text "there") lays out as  hi there rather than  hi there is associative, with identity a, and also satisfies(x  y)  z = x  (y  z), if y non-empty.Above, with no overlapping.  is associative, with identity a. Beside.  is associative, with identity a.;Beside, separated by space, unless one of the arguments is a.  is associative, with identity a.Either  or .Either ~ or ."Paragraph fill" version of ."Paragraph fill" version of .firstE returns its first argument if it is non-empty, otherwise its second. Render the Doc to a String using the default Style. Render the Doc to a String using the given Style.Default TextDetails printer The general rendering interface.?[\]^_`abcA ';' characterdA ',' charactereA : characterfA space charactergA '=' characterhA '(' characteriA ')' characterjA '[' characterkA ']' characterlA '{' charactermA '}' charactern int n = text (show n)o integer n = text (show n)p float n = text (show n)q double n = text (show n)r rational n = text (show n)sWrap document in '...'tWrap document in "..."uWrap document in (...)vWrap document in [...]wWrap document in {...}xyz{|}~Rendering mode Line lengthRibbons per lineWhat to do with textWhat to do at the end The documentResultD J[\]^_`abcdefghijklmnopqrstuvwxyz{|}~D[\]^_`nopqrcdefghijklmuvwstxyz{|a~b} J >[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Lennart Augustsson 2014 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe0PPretty printing class. The precedence level is used in a similar way as in the . class. Minimal complete definition is either  or .KLevel of detail in the pretty printed output. Level 0 is the least detail.!The "normal" (Level 0) of detail.Pretty print a value with the  level.-Parenthesize an value if the boolean is true.     M J[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      "(c) The University of Glasgow 2001 BSD-style (see the file LICENSE)!David Terei <code@davidterei.com>stableportableSafe0= J[\]^_`abcdefghijklmnopqrstuvw~=[\]^_`nopqrcdefghijklmuvwsta~b J       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNPQRWXYZ[[\]^_`abcdefghijkllmmnopqrstuvwxyz{|}~dckprett_GTns21GMda46X7YuiNUipWText.PrettyPrint.Annotated#Text.PrettyPrint.Annotated.HughesPJ(Text.PrettyPrint.Annotated.HughesPJClassText.PrettyPrintText.PrettyPrint.HughesPJText.PrettyPrint.HughesPJClassSpan spanStart spanLengthspanAnnotationModePageMode ZigZagModeLeftMode OneLineModeStylemode lineLengthribbonsPerLine TextDetailsChrStrPStr AnnotDetails AnnotStartNoAnnotAnnotEndDocannotatechartextptext sizedText zeroWidthTextemptyisEmptysemicommacolonspaceequalslparenrparenlbrackrbracklbracerbraceintintegerfloatdoublerationalquotes doubleQuotesparensbracketsbraces maybeParens maybeBrackets maybeBraces maybeQuotesmaybeDoubleQuotes reduceDochcathsepvcatnesthang punctuate$$$+$<><+>sepcatfcatfsepfirststylerender renderStyle fullRender fullRenderAnn renderSpansrenderDecoratedrenderDecoratedMPretty pPrintPrecpPrint pPrintList PrettyLevel prettyNormal prettyShow prettyParensOffsetsStacksSpanssOutputRDocbaseGHC.Base++ghc-prim GHC.TypesTrueindent txtPrinterSpansIsEmptyNotEmptyEmptyNilAbove TextBesideNestUnionNoDocBesideAbove annotSize spaceTextnlTextmkNestmkUnion reduceHoriz reduceVerteliminateEmpty nilAbove_ textBeside_nest_union_above_above aboveNest nilAboveNestbeside_beside nilBesidesepXsep1sepNBfillfill1fillNBfillNBE elideNestbestnicestnicest1fits nonEmptySetoneLiner easyDisplaydisplay $fFunctorSpan$fNFDataTextDetails$fNFDataAnnotDetails $fNFDataDoc $fFunctorDoc$fEqDoc $fShowDoc $fIsStringDoc $fMonoidDoc$fFunctorAnnotDetailsGHC.ShowShowpPrint0appPrec$fPretty(,,,,,,,)$fPretty(,,,,,,)$fPretty(,,,,,)$fPretty(,,,,) $fPretty(,,,) $fPretty(,,) $fPretty(,) $fPretty[]$fPrettyEither $fPrettyMaybe $fPrettyChar$fPrettyOrdering $fPrettyBool $fPretty()$fPrettyDouble $fPrettyFloat$fPrettyInteger $fPrettyIntliftList liftBinary