}8s      !"#$%&'()*+,-./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.9Default values for &. ( defaults to 4, and ) defaults to *.?MA function that performs optimizations and modifications to a list of input  s. An sample of an optimization is @= which just removes a newline if it is the first item in an   list.@ 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}]AIf 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"}]BIn each > token, compress multiple whitespaces to just one whitespace.=shrinkWhitespaceInOthers [Output 0 (OutputOther " hello ")]c[Output {outputNestLevel = NestLevel {_unNestLevel = 0}, outputOutputType = OutputOther " hello "}](&'()*+,789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW(&'()*,+789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW(*+,&'()879:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW#&'()*+,789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT XYZ[\]^_` X]YZ[\^_` ^_`XYZ[\]XYZ[\]^_`(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OTs,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 " "]]}))xParse a string literal."test stringLiteralExpr "\"hello\""Right (StringLit "hello"),isLeft $ test stringLiteralExpr " \"hello\""Truez<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 ","Trueijklmnopqrstuvwxyz{|}ijklmnopqrstuvwxyz{|}ijklmnopqrstuvwxyz{|}ijklmnopqrstuvwxyz{|}(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 Xs. 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 experimentalPOSIXNoney &'()*,+789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX]YZ[\^_`ijklmnopqrstuvwxyz{|}~(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT &'()*,+9&'()*+,9       !"#$%&'()*+,,-./0/123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abbcdefghijklmnopqrstuvwxyz{|}~+pretty-simple-1.0.0.2-p2InAuck1jFLi1e3tY6ZR"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 OutputOptions _indentAmount _useColorUseColorNoColor$fDataUseColor $fEqUseColor$fGenericUseColor$fReadUseColor$fShowUseColor$fDataOutputOptions$fEqOutputOptions$fGenericOutputOptions$fReadOutputOptions$fShowOutputOptions indentAmountuseColordefaultOutputOptionsrender renderOutputsrenderRaibowParenFor renderOutput sequenceFoldmodificationsOutputListremoveStartingNewLinecompressOthersshrinkWhitespaceInOthersshrinkWhitespaceInOthershrinkWhitespace colorQuote colorString colorErrorcolorNum rainbowParen canUseColorifM colorBold colorResetcolorVividBluecolorVividCyancolorVividGreencolorVividMagenta colorVividRedcolorVividWhitecolorVividYellow colorHelper appendColorssetSGRCodeBuilderExprBracketsBracesParens 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.TypesInt