úÎ4ø1HH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT   (c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT,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 " "]]})) Parse a string literal."test stringLiteralExpr "\"hello\""Right (StringLit "hello"),isLeft $ test stringLiteralExpr " \"hello\""True"<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 ","True !"#$% !"#$% !"#$% !"#$%(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OT70This assumes that the indent stack is not empty.?%Print a surrounding expression (like [] or {} or ()).If the > expressions are empty, just print the start and end markers.6testInit $ putSurroundExpr "[" "]" (CommaSeparated [])\PrinterState {_currLine = 0, _currCharOnLine = 2, _indentStack = [0], _printerString = "[]"},let state = printerState 1 5 [5,0] "\nhello":test state $ putSurroundExpr "(" ")" (CommaSeparated [[]])ePrinterState {_currLine = 1, _currCharOnLine = 7, _indentStack = [5,0], _printerString = "\nhello()"}lIf there is only one expression, then just print it it all on one line, with spaces around the expressions.RtestInit $ putSurroundExpr "{" "}" (CommaSeparated [[Other "hello", Other "bye"]])gPrinterState {_currLine = 0, _currCharOnLine = 12, _indentStack = [0], _printerString = "{ hellobye }"}ªIf there are multiple expressions, and this is indent level 0, then print out normally and put each expression on a different line with a comma. No indentation happens.(comma = [[Other "hello"], [Other "bye"]]9testInit $ putSurroundExpr "[" "]" (CommaSeparated comma)kPrinterState {_currLine = 2, _currCharOnLine = 1, _indentStack = [0], _printerString = "[ hello\n, bye\n]"}&'()*+0123456789:;<=>?starting character ([ or { or ()ending character (] or } or ))!comma separated inner expression.@ABCD&'()*+0123456789:;<=>?@ABCD&'()*+3210456789:;<=>?@ABCD&'()*+0123456789:;<=>?@ABCD(c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNone 05:OTEFGEFGFEGEFGH       !"#$%&'()**+,-./0123456789:;<=>?@ABCDEFGHIJK,pretty-simple-0.1.0.0-97nh4kIYK85IEGMrhjvVIt Text.Pretty.Simple.Internal.Expr"Text.Pretty.Simple.Internal.Parser#Text.Pretty.Simple.Internal.PrinterText.Pretty.SimpleExprBracketsBracesParens StringLitOtherCommaSeparatedunCommaSeparated$fDataCommaSeparated$fEqCommaSeparated$fGenericCommaSeparated$fShowCommaSeparated $fDataExpr$fEqExpr $fGenericExpr $fShowExprParserlexer stringLiteralbracketsbracesparenscommaSeplexemeexprexpr' bracketsExpr bracesExpr parensExprrecursiveSurroundingExpr recursiveExprstringLiteralExprnonRecursiveExpr anyOtherText testString1 testString2expressionParse PrinterState _currLine_currCharOnLine _indentStack_printerString$fEqPrinterState$fDataPrinterState$fGenericPrinterState$fShowPrinterStatecurrCharOnLinecurrLine indentStack printerString printerStateinitPrinterState_headEx latestIndent popIndentsetIndentAtCurrCharputOpeningSymbolputClosingSymbolputComma putCommaSep putStringputSurroundExprdoIndentnewLinenewLineAndDoIndent putExpressionexpressionPrintpPrintpShowpString