B      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone-05:DIORT3Datatype representing how much something is nested.For example, a  of 0 would mean an  8 token is at the very highest level, not in any braces.A  of 1 would mean that an  ! token is in one single pair of { and }, or [ and ], or @ and @@.A  of 2 would mean that an  ' token is two levels of brackets, etc. An  token together with a . Basically, each  keeps track of its own .CThese are the output tokens that we will be printing to the screen.This represents the } character.This represents the ] character.This represents the ) character.This represents the , character.This represents an indentation.This represents the \n character.This represents the { character.This represents the [ character.This represents the ( character.[This represents some collection of characters that don't fit into any of the other tokens.1This represents a string literal. For instance, "foobar". (and W) should generally only be used in tests and debugging. There is no way to represent  and .      (c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT &LData-type wrapping up all the options available when rendering the list of  s.(NNumber of spaces to use when indenting. It should probably be either 2 or 4.)<Whether or not to use ansi escape sequences to print colors.**B describes whether or not we want to use color when printing the   list.-Default values for &. ( defaults to 4, and ) defaults to *.3MA function that performs optimizations and modifications to a list of input  s. An sample of an optimization is 4= which just removes a newline if it is the first item in an   list.4 Remove a  if it is the first item in the   list.DremoveStartingNewLine [Output 3 OutputNewLine, Output 3 OutputComma]Y[Output {outputNestLevel = NestLevel {_unNestLevel = 3}, outputOutputType = OutputComma}]5If there are two subsequent % tokens, combine them into just one .KcompressOthers [Output 0 (OutputOther "foo"), Output 0 (OutputOther "bar")]b[Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther "foobar"}]6In each > token, compress multiple whitespaces to just one whitespace.=shrinkWhitespaceInOthers [Output 0 (OutputOther " hello ")]c[Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther " hello "}]&&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK&&'()*,+-./0123456789:;<=>?@ABCDEFGHIJK&*+,&'()-./0123456789:;<=>?@ABCDEFGHIJK!&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT VWXYZ[\]^ V[WXYZ\]^ \]^VWXYZ[VWXYZ[\]^(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OTq,Parse brackets around a list of expressions.(test bracketsExpr "[hello\"what\", foo]"gRight (Brackets (CommaSeparated {unCommaSeparated = [[Other "hello",StringLit "what"],[Other "foo"]]}))test bracketsExpr "[[] ]"vRight (Brackets (CommaSeparated {unCommaSeparated = [[Brackets (CommaSeparated {unCommaSeparated = []}),Other " "]]}))vParse a string literal."test stringLiteralExpr "\"hello\""Right (StringLit "hello"),isLeft $ test stringLiteralExpr " \"hello\""Truex<Parse anything that doesn't get parsed by the parsers above.test anyOtherText " Foo "Right (Other " Foo ")Parse empty strings.test anyOtherText " "Right (Other " ")Stop parsing if we hit [, ], (, ), {, }, ", or ,.test anyOtherText "hello["Right (Other "hello")Don't parse the empty string.isLeft $ test anyOtherText ""TrueisLeft $ test anyOtherText ","Trueghijklmnopqrstuvwxyz{ghijklmnopqrstuvwxyz{ghijklmnopqrstuvwxyz{ghijklmnopqrstuvwxyz{(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone05:DIORT|Newtype around 4 to represent a line number. After a newline, the | will increase by 1.Smart-constructor for .%Print a surrounding expression (like [] or {} or ()).If the \> expressions are empty, just print the start and end markers.6testInit $ putSurroundExpr "[" "]" (CommaSeparated [])5PrinterState {_currLine = LineNum {unLineNum = 0}, _nestLevel = NestLevel {_unNestLevel = -1}, _outputList = fromList [Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOpenBracket},Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputCloseBracket}]}If there is only one expression, and it will print out on one line, then just print everything all on one line, with spaces around the expressions.EtestInit $ putSurroundExpr "{" "}" (CommaSeparated [[Other "hello"]])IPrinterState {_currLine = LineNum {unLineNum = 0}, _nestLevel = NestLevel {_unNestLevel = -1}, _outputList = fromList [Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOpenBrace},Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther " "},Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther "hello"},Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther " "},Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputCloseBrace}]}~If there is only one expression, but it will print out on multiple lines, then go to newline and print out on multiple lines.1 + 1 -- TODO: Example here.2\If there are multiple expressions, then first go to a newline. Print out on multiple lines.1 + 1 -- TODO: Example here.2MA function that performs optimizations and modifications to a list of input Vs. An sample of an optimization is ' which removes empty inner lists in a \ value.(Remove empty lists from a list of lists.$removeEmptyList [[1,2,3], [], [4,5]][[1,2,3],[4,5]]removeEmptyList [[]][]removeEmptyList [[1]][[1]]+removeEmptyList [[1,2], [10,20], [100,200]][[1,2],[10,20],[100,200]]|}~!comma separated inner expression.|}~|}~|}~(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNonew &'()*,+-./0123456789:;<=>?@ABCDEFGHIJKV[WXYZ\]^ghijklmnopqrstuvwxyz{|}~(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT &Pretty-print any data type that has a  instance.If you've never seen P before, you can think of this function as having the following type signature:  pPrint :: Show a => a -> IO ()  Similar to ?, but just return the resulting pretty-printed data type as a & instead of printing it to the screen. Similar to , but the first argument is a 1 representing a data type that has already been ed. Similar to R, but doesn't print in color. However, data types will still be indented nicely.%pPrintNoColor $ Just ["hello", "bye"]Just [ "hello" , "bye" ]Like , but without color.LIke , but without color. is just like -, but ) is set to +. Similar to  but takes &, to change how the pretty-printing is done. For example, ? can be used to make the indentation much smaller than normal./This is what the normal indentation looks like:6pPrintOpt noColorOutputOptions $ Just ("hello", "bye")Just ( "hello" , "bye" ),This is what smaller indentation looks like:Flet smallIndent = noColorOutputOptions {outputOptionsIndentAmount = 1}-pPrintOpt smallIndent $ Just ("hello", "bye")Just ( "hello" , "bye" )Like  but takes &, to change how the pretty-printing is done.Like  but takes &, to change how the pretty-printing is done. &'()*,+-&'()*+,-       !"#$%&'()*+,,-./0/123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_``abcdefghijklmnopqrstuvwxyz{|}~,pretty-simple-1.1.0.0-3gJFf7RYiXvCFnLgE3HboP"Text.Pretty.Simple.Internal.Output)Text.Pretty.Simple.Internal.OutputPrinter Text.Pretty.Simple.Internal.Expr&Text.Pretty.Simple.Internal.ExprParser(Text.Pretty.Simple.Internal.ExprToOutputText.Pretty.SimpleText.Pretty.Simple.Internal NestLevel _unNestLevel$fDataNestLevel $fEqNestLevel$fGenericNestLevel$fNumNestLevel$fOrdNestLevel$fReadNestLevel$fShowNestLevelOutputoutputNestLeveloutputOutputType OutputTypeOutputCloseBraceOutputCloseBracketOutputCloseParen OutputComma OutputIndent OutputNewLineOutputOpenBraceOutputOpenBracketOutputOpenParen OutputOtherOutputStringLit unNestLevel$fIsStringOutputType$fDataOutputType$fEqOutputType$fGenericOutputType$fReadOutputType$fShowOutputType $fDataOutput $fEqOutput$fGenericOutput $fReadOutput $fShowOutput OutputOptionsoutputOptionsIndentAmountoutputOptionsUseColorUseColorNoColordefaultOutputOptionsrender renderOutputsrenderRaibowParenFor renderOutput sequenceFoldmodificationsOutputListremoveStartingNewLinecompressOthersshrinkWhitespaceInOthersshrinkWhitespaceInOthershrinkWhitespace colorQuote colorString colorErrorcolorNum rainbowParen canUseColorifM colorBold colorResetcolorVividBluecolorVividCyancolorVividGreencolorVividMagenta colorVividRedcolorVividWhitecolorVividYellow colorHelper appendColorssetSGRCodeBuilder$fDataUseColor $fEqUseColor$fGenericUseColor$fReadUseColor$fShowUseColor$fDataOutputOptions$fEqOutputOptions$fGenericOutputOptions$fReadOutputOptions$fShowOutputOptionsExprBracketsBracesParens StringLitOtherCommaSeparatedunCommaSeparated$fDataCommaSeparated$fEqCommaSeparated$fGenericCommaSeparated$fShowCommaSeparated $fDataExpr$fEqExpr $fGenericExpr $fShowExprParserlexer stringLiteralbracketsbracesparenscommaSeplexemeexprexpr' bracketsExpr bracesExpr parensExprrecursiveSurroundingExpr recursiveExprstringLiteralExprnonRecursiveExpr anyOtherText testString1 testString2expressionParseLineNum unLineNum $fDataLineNum $fEqLineNum$fGenericLineNum $fNumLineNum $fOrdLineNum $fReadLineNum $fShowLineNum PrinterState _currLine _nestLevel _outputList$fEqPrinterState$fDataPrinterState$fGenericPrinterState$fShowPrinterStatecurrLine nestLevel outputList printerState addOutput addOutputsinitPrinterStateputSurroundExpr putCommaSepputComma howManyLinesdoIndentnewLinenewLineAndDoIndent putExpressionrunPrinterStaterunInitPrinterStateexpressionsToOutputsmodificationsExprList&removeEmptyInnerCommaSeparatedExprList"removeEmptyInnerCommaSeparatedExprremoveEmptyInnerCommaSeparatedremoveEmptyListpPrintpShowpString pPrintNoColor pShowNoColorpStringNoColornoColorOutputOptions pPrintOptpShowOpt pStringOptbase Data.StringIsString fromStringghc-prim GHC.TypesIntGHC.ShowShowControl.Monad.IO.ClassMonadIO#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.Internal.LazyTextGHC.BaseStringshow