úÎ^bY`     A rendering style The rendering mode Length of line, in chars &Ratio of ribbon length to line length +Render a document using a particular style  internally calls   The default  used for Text.PrettyPrint.GenericPretty 4 (mode=PageMode, lineLength=80, ribbonsPerLine=1.5) B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSS" is the (*->*) kind equivalent of   TT+ marks nullary constructors, so that we don't put parens around them UVWX The class  is the equivalent of Y )Conversion of values to pretty printable  Pretty.Docs. Minimal complete definition:   or  . Derived instances of  have the following properties  The result of Z$ is a syntactically correct Haskell : expression containing only constants, given the fixity B declarations in force at the point where the type is declared. D It contains only the constructor names defined in the data type, B parentheses, and spaces. When labelled constructor fields are E used, braces, commas, field names, and equal signs are also used. = If the constructor is defined to be an infix operator, then   5 will produce infix applications of the constructor. ; the representation will be enclosed in parentheses if the . precedence of the top-level constructor in x is less than d ) (associativity is ignored). Thus, if d is 0 then the result * is never surrounded in parentheses; if d is 11 it is always A surrounded in parentheses, unless it is an atomic expression. 9 If the constructor is defined using record syntax, then   E will produce the record-syntax form, with the fields given in the + same order as the original declaration. $For example, given the declarations  E data Tree a = Leaf a | Node (Tree a) (Tree a) deriving (Generic) The derived instance of  is equivalent to: ( instance (Out a) => Out (Tree a) where  F docPrec d (Leaf m) = Pretty.sep $ wrapParens (d > appPrec) $ R text "Leaf" : [nest (constrLen + parenLen) (docPrec (appPrec+1) m)]  where appPrec = 10  constrLen = 5; : parenLen = if(d > appPrec) then 1 else 0  H docPrec d (Node u v) = Pretty.sep $ wrapParens (d > appPrec) $  text "Node" : E nest (constrLen + parenLen) (docPrec (appPrec+1) u) : D [nest (constrLen + parenLen) (docPrec (appPrec+1) v)]  where appPrec = 10  constrLen = 5 : parenLen = if(d > appPrec) then 1 else 0   is the equivalent of [ ' Convert a value to a pretty printable  Pretty.Doc. )the operator precedence of the enclosing  context (a number from 0 to 11). % Function application has precedence 10. the value to be converted to a \ the resulting L  |   is the equivalent of Z  A specialised variant of  !, using precedence context zero.   is the equivalent of ]  The method  ( is provided to allow the programmer to 4 give a specialised way of showing lists of values. - For example, this is used by the predefined  instance of  the ^ type, where values of type \ should be shown 8 in double quotes, rather than between square brackets. edefault generic out method, converts the type into a sum of products and passes it on to the generic C pretty printing functions, finally it concatenates all of the SDoc's 5 needs to be used in code to define the instance for  &For instance, given the declaration:  E data Tree a = Leaf a | Node (Tree a) (Tree a) deriving (Generic) ;The user would need to write an instance declaration like:  ( instance (Out a) => Out (Tree a) where  docPrec = genOut AAfter doing this, the user can now pretty printing function like  and   on data of type Tree _` MUtility function used to wrap the passed value in parens if the bool is true L A single paren should never occupy a whole line, so they are concatenated U to the first and last elements in the list, instead of just adding them to the list a( is a fully customizable Pretty Printer > Every other pretty printer just gives some default values to  The Pretty mode to use (eg: 'Pretty.PageMode') The maximum line length The number of ribbons per line /'(the fraction of line length over the F max length of non-indentation text per line; eg: lineLength = 80 and G ribbonsPerLine = 1.5 => max of 53 non-indentation characters per line)/ *Function that handles the text conversion (eg: 'outputIO') The end element of the result ( eg: "" or putChar('\n') ) The value to pretty print The pretty printed result ; transforms the text into strings and outputs it directly. K This is one example of a function that can handle the text conversion for . $ just leaves the text as a string, C usefull is you want to further process the pretty printed result. O This is another example of a function that can handle the text conversion for . 2Customizable pretty printer, takes a user defined  as a parameter  uses  to obtain the result FSemi-customizable pretty printer. Takes the lineLength as a parameter  uses mode = Pretty.PageMode and ribbonsPerLine = 1 %The default pretty printer returning \s  uses the default MyPretty.Style,  2Customizable pretty printer, takes a user defined MyPretty.Style as a parameter  uses  to obtain the result FSemi-customizable pretty printer. Takes the lineLength as a parameter  uses mode = Pretty.PageMode and ribbonsPerLine = 1 The default Pretty Printer,  uses the default MyPretty.Style,      b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a_`b_`c_de_`fghijklGenericPretty-1.1.5Text.PrettyPrint.GenericPrettyText.PrettyPrint.MyPrettyghc-prim GHC.GenericsGenericStylemode lineLengthribbonsPerLine renderStylestyleOutdocPrecdocdocListgenOut wrapParensfullPPoutputIO outputStr prettyStyle prettyLenprettyppStyleppLenpp ghc-7.2.1Pretty fullRender bufLeftRenderprintDoc showDocWithrenderfcatfsepcatsep<+><>$+$$$nest zeroWidthTextptextftexttextcharisEmptyempty punctuatehangvcathsephcatcparenbracesbracketsparens doubleQuotesquotesrationaldoublefloatintegerintrbracelbracerbracklbrackrparenlparenequalsspacecommacolonsemiPageMode ZigZagModeLeftMode OneLineModeModeDocChrStrPStrLStr TextDetailsGOutout1 isNullaryTypeInfPrefRecbaseGHC.ShowShowshow showsPrecGHC.BaseStringshowList GHC.TypesChar docListWithmiddleshowDocOneLine