úÎ}BoP¼      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º» Safe-Inferred,Flipped .  Great for parsing infixes, e.g. addExpr = expr <$$> (+) <*> expr. p <||> q tries to parse p, but if it fails, parses q.  Unlike the ¼ instance for ½, backtracking will occur if p fails.  That is, a parser such as string "flange" <||> string "fly" will succeed on  the input "fly":, whereas its Parsec counterpart will unintuitively fail.  choice ps( tries to apply the parsers in the list ps in order, A until one of them succeeds. Returns the value of the succeeding B parser. Unlike the Parsec version, this one ensures that parsers $ do not consume input if they fail. OGiven a map of parsers to parsers, attempt each key parser until one succeeds, J then perform the value parser. Return the result of the value parser. !CAttempt all of the passed parsers under the current conditions and D return the value of the parser which makes it furthest into the ( input stream (and updates the parser'%s internals as if that were the only  parser parsed). (longestOf [string "do", string "don't"] " option x p tries to apply parser p. If p! fails, no input is consumed and x  is returned. # optional p tries to parse p(, but does not fail or consume input of p fails.  This is like , but is easier to type. See $. $ optional_ p tries to parse p(, but does not fail or consume input if p fails. This is like Parsec'!s Text.Parsec.Combinator.optional'., but the use of underscore is more idiomatic + for actions whose results are ignored. % atLeast n p applies the parser p n or more times. & atMost n p applies the parser p up to n times. ' manyNM n m p applies the parser p n or more times up to m times. (Parse zero+ or more of any mix of the passed parsers. )As (, but ignoring the results. *many p applies the parser p zero+ or more times and accumulates the result. +many p applies the parser p one+ or more times and accumulates the result. ,many1_ p applies the parser p one or more times, skipping  its result. -many1_ p applies the parser p zero or more times, skipping  its result. .manyTill p end applies parser p zero or more times until  parser end2 succeeds. Returns the list of values returned by p.  The end parser does not consume input, c.f. /. . This parser can be used to scan comments:  # simpleComment = do { string "//" 4 ; anyChar `manyTill` char '\n'  } *Note that despite the overlapping parsers anyChar and char '\n', # there is never a need to add a try: the end parser does not consume  input on failure. /manyThru p end applies parser p zero or more times until  parser end2 succeeds. Returns the list of values returned by p.  The end parser does consume input, c.f. . , but is not  included in the result. . This parser can be used to scan comments:  % simpleComment = do { string "<!--" 7 ; anyChar `manyThru` string "-->"  } *Note that despite the overlapping parsers anyChar and string "-->",  there is no need to add a try: the end parser does not consume input  on failure. 0 chomp p x will parse p, then, provided x succeeds, discard a  subsequent parse of x. ( This combinator will only fail when p fails, not when x does. 1 between2 p q is equivalent to between p p q % double_quoted = between2 (char '"') 2 sepBy p sep parses zero or more occurrences of p , separated  by sep'. Returns a list of values returned by p. ' commaSep p = p `sepBy` (symbol ",") 3 sepBy1 p sep parses one or more occurrences of p , separated  by sep'. Returns a list of values returned by p. 4sepEndBy p sep parses zero or more occurrences of p, # separated and optionally ended by sep. 8 haskellStatements = haskellStatement `sepEndBy` semi 5sepEndBy1 p sep parses one or more occurrences of p, & separated and optionally ended by sep. 6 endBy p sep parses zero or more occurrences of p , seperated  and ended by sep. * cStatements = cStatement `endBy` semi 7 endBy1 p sep parses one or more occurrences of p , seperated  and ended by sep. 8sepAroundBy p sep parses zero or more occurrences of p, 8 separated and optionally starting with and ended by sep. 9sepAroundBy1 p sep parses one or more occurrences of p, 8 separated and optionally starting with and ended by sep. : chainl p op z parses zero or more occurrences of p,  separated by op . Returns a value obtained by a left associative - application of all functions returned by op to the values returned  by p#. If there are zero occurrences of p , the value z is  returned. C.f. <. ; chainl1 p op parses one or more occurrences of p,  separated by op Returns a value obtained by a left associative - application of all functions returned by op to the values returned  by p8. This parser can for example be used to eliminate left = recursion which typically occurs in expression grammars.  # expr = term `chainl1` mulop # term = factor `chainl1` addop $ factor = parens expr <|> integer  - mulop = do{ symbol "*"; return (*) } - <|> do{ symbol "/"; return (div) }  + addop = do{ symbol "+"; return (+) } + <|> do{ symbol "-"; return (-) } C.f. =. < chainr p op z parses zero or more occurrences of p,  separated by op Returns a value obtained by a right associative - application of all functions returned by op to the values returned  by p!. If there are no occurrences of p , the value z is  returned. C.f. :. = chainr1 p op parses one or more occurrences of p,  separated by op Returns a value obtained by a right associative - application of all functions returned by op to the values returned  by p. C.f. ;. > lookAhead p parses p& without consuming any input, even if p fails. ?As >, but throw away result. @notFollowedBy p q parses p, but only when q will fail immediately  after parsing p . Parsing q# never consumes input, and if this , combinator fails, no input is consumed. -This combinator can be used to implement the ' longest match' rule. 8 For example, when recognizing keywords (for example let ), we want F to make sure that a keyword is not followed by a legal identifier C character, in which case the keyword is actually an identifier  (for example lets,). We can program this behavior as follows: 5 keywordLet = string "let" `notFollowedBy` alphaNum AReturns ¾ if there is no input left, ¿ if there is. B2Succeed only when at the end of the input stream. CKUses the passed parser, but succeeds only if it consumes all of the input. DPParse using the passed parser, but also return the input that was not consumed. EFlipped <?>. FAAnnotate the return value of the passed parser with the position  just before parsing. GAAnnotate the return value of the passed parser with the position  just after parsing. HAAnnotate the return value of the passed parser with the position 0 just before and after parsing respectively. .À½ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH: !"#$*+-,%&'()./0 123456789:;<=>?@ABCDEFGH.À½ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH Safe-InferredISynonym for parsers over the Á monad. JSynonym for lexers over the Á monad. K+The lexer and parser communicate using the K type. 9Lexemes carry position information as well as a payload. ; Generally, you will want to define a data type for the  payload and use R to extract particular cases of  payloads for parsing. LA parser: consumer of Ks MA lexer: producer of Ks N.Connect and run a lexer and parser together. OAs N in the Á monad. P)Wrap a normal parser into a parser for a K. @ The passed parser determines the payload. Use this function D at the boundary of the lexer and parser: when a complete lexeme = has been recognized, but parsing has not been performed. AOn failure, the resulting parser does not consume input, even if  the passed parser would. QJDrop lexemes from the input stream whose payloads that satisfy the passed P predicate. This is useful, for example, in whitespace-insensitive languages R to remove extraneous whitespace so it need not clutter the parser definition. :WARNING: use only as the first action in a parsing monad. RKObtain a lexeme from the stream only if it satisfies the passed predicate. CThis is a very important function for building parsers. Generally, & after defining your data type for K payloads, you will implement E several combinators for recognizing each case of your data type. SUnpacks a payload from the K& stream and attempts to transform it. . If the transformation fails (evaluates to Â), then this parser fails. TUnpacks a payload from the K6 stream. Only fails at the end of the lexeme stream. U/Succeed only at the end of the lexeme stream. V=Detect whether the parser is at the end of the lexeme stream  without consuming input. IJKÃÄLMN3lexer: transform raw input stream into many tokens 0parser: transform token stream into parsed data O3lexer: transform raw input stream into many tokens 0parser: transform token stream into parsed data PQRSTUVÅÆÇÈÉIJKLMNOPQRSTUVMLKNJIOPQTSRUVIJKÄÃLMNOPQRSTUVÅÆÇÈÉ Safe-InferredNW6Determine how the depth of indentation is calculated. X&Allow any mix of of the passed Chars. ( Calculate depth by assigning a number , to each of character by kind and summing. Y)Any of the passed Chars can be used, but . allow only one kind of character in a line. ' Depth is number of those characters. Zstring s* parses a sequence of characters given by s . Returns  the parsed string (i.e. s#). Unlike the Parsec version, this . combinator never consumes input on failure. % adrenalineWord = string "fight" % <|> string "flight" [EParse a single character, case-insensitive. Normalized to lowercase. \NParse a string, case-insensitive. If this parser fails, it consumes no input.  Normalized to lowercase. ]5Parse a single char when it satisfies the predicate. F Fails when the next input character does not satisfy the predicate. ^Parse zero3 or more characters satisfying the predicate, c.f. _. _Parse one3 or more characters satisfying the predicate, c.f. ^. `Rule UPALPHA from RFC2616 §2.2aRule LOALPHA from RFC2616 §2.2bRule ALPHA from RFC2616 §2.2cRule DIGIT from RFC2616 §2.2dParse a binary digit ('0' or '1') eRule CTL from RFC2616 §2.2f+A single printable ASCII character, as the TEXT rule from RFC2616 §2.2 g:A single printable unicode character, a generalization of text. See . hA carriage return (ASCII 13) iA line feed (ASCII 10) jA space (ASCII 32) kA horizonal tab (ASCII 9) lA single quote mA double quote n A colon (:) oA semicolon (;) p A period (.) q A comma (,) rTwo dots (..) sThree dots (...) t=A backslash-escape: backslash followed by a single character  satisfying the predicate. uParse "yes", "y", or "1"!, case-insensitive. Return True. vParse "no", "n", or "0"", case-insensitive. Return False. wParse u or v, and return whether the answer was yes-ful. x(A carriage return + line feed sequence. y Short for "linear whitespace": one or more spaces or tabs.  Similar to rule LWS- from RFC2616 §2.2, but without line folding.z-Parse a single line feed or carriage return. # Does not succeed at end of file. {GRecognize when the parser is at a line break (LF, CR, or end of input) 1 If the break is due to a CR or LF, consume it. | Parse a backslash followed by a z } Parse a backslash followed by a z,  then linear whitespace (y!) and finally another backslash. ~Parse a {$ followed by whitespace characters. % Return the depth of indentation. ?The acceptable whitespace characters and the method by whch to ( caclulate depth is determined by an  IntentPolicy. -WARNING: Do not use this combinator with the Lex module, it ( will break because Parsec is sissy. Ê Version of ~, suitable for us in lexing parsers built on Lex DThis parser will not detect dedents at the end of input. Therefore, B when you wish to recognize a dedent in your parser, recognize B # as well as your dedent tokens. KParse one or more characters that satisfy a predicate, but with additional 0 restrictions on the first character parsed. 3This is especially useful for identifiers (such as /[a-zA-Z_] [a-zA-Z_0-9]*/) * and certain kinds of numbers (such as /[1-9][0-9]*/).   identifier = œ " a-zA-Z0-9_" `many1Not` œ "0-9" naturalLiteral = ¢ 10 <$> œ "0-9" `many1Not` (=='0') €?Parse a sigil character immediately followed by an identifier.  data Sigil = Scalar | Array name = sigilized (zip "$@" [Scalar, Array]) $  (charClass' " _a-zA-Z0-9") (œ "0-9") *Parse between open and close parenthesis. ‚.Parse between open and close square brackets ([...]). ƒ+Parse between open and close curly braces ({...}). „%Parse between open and close angles (<...>). …CParse a minus or plus sign and return the appropriate multiplier. †Parse "0x", "0o", or "0b"3 case-insensitive and return the appropriate base. , If none of these parse, return base 10. ‡LParse many digits in the passed base and return the corresponding integer. ˆKParse many digits in the passed base and return the appropriate rational. ‰?Parse a natural in the passed base and return its reciprocal. ŠOptional sign as …, defaults to positive. ‹Parse an optional sign (as Š), then a natural number ! of the specified base (as in ‡). Œ:Parse an integer: optional sign, then a number of digits. 9 Bases 10, 16, 8 and 2 are supported with appropriate  prefixes as in † before the digits. >Parse a rational number: an optional sign, then two sequences H of digits separated by a slash. Return the ratio of the appropriate G sign between the two numbers. Bases 10, 16, 8 and 2 are supported. Ž>Parse a number in scientific notation: an optional sign, then 9 a radix mark, two sequences of digits separated by a p, and B finally an optional exponent, which is an exponent letter, an C optional sign and finally one or more digits in the same base. 8The base of the exponent is the same as the base of the < significand. In base ten, the exponent letter is either e or  p!, but in other bases, it must be p (since e is already  a hexdigit). ANote that digits are required on both sides of the (hexa)decimal  point, so neither 0. nor .14 are recognized. &Parse a two-digit hexadacimal number. AParse a backslash and another character; use the passed table to $ determine the returned character. ‘BCommon characetr escapes in programming language string literals: \0 -> ASCII 00 (nul) \a -> ASCII 07 (alarm/bell) \b -> ASCII 08 (backspace) \e -> ASCII 1B (escape) \f -> ASCII 0C (form feed) \n -> ASCII 0A (line feed) !\r -> ASCII 0D (carriage return)  \t -> ASCII 09 (horizontal tab) \v -> ASCII 0B (vertical tab) \' -> single-quote \" -> double-quote \\ -> backslash ’-Escape sequences for any unicode code point. ; Represented by a backslash + one or more decimal digits. = Fails when the code point is not representable in unicode. “.Escape sequences for bytes (including ASCII). . Represented by a backslash + two hexdigits. ”EEscape sequences in the Unicode Basic Multilingual Plane (BMP). C.f. •. ' Represented by a backslash+lowercase u followed by four hexdigits. •/Escape sequences outside the Unicode BMP. C.f. ”. ' Represented by a backslash+uppercase U followed by five or six ' hexdigits totalling at most 0x10FFFF –A unicode escape, either as ” or •. —CParse a single-quoted string with no escape sequences, except that L a single-quote in the string is encoded as two single-quote characters. EThis is as single-quoted strings in SQL and Rc (the shell in Plan9). H It is an excellent encoding for strings because they are so easy to G validate from untrusted input and escape for rendering, whether it ! is done by human or machine. ˜EParse a double-quoted string with common backslash escape sequences.  We use ? with the passed table of contents. There is no default table.  Also, ’, “ and – are allowed.  Further, the \&4 stands for no character: it literally adds nothing F to the string in which it appears, but it can be useful as in  "\127\&0". K Finally, lines can be folded with a backslash-newline-backslash, ignoring  any yA between the newline and the second backslash. This is preferred P over a simple backslash-newline, as it reduces any need to remember how 9 leading whitespace is treated after a line-fold. The escapes parsed by # are preferred to the other escape H sequences. Note that there are no escape sequences for backslash or C double-quote by default (aside from a numerical escape), so you'll * need to include them in the table for . ™?Parse a comment beginning with the passed string and ending at  (but not including) a {. šAParse a non-nesting comment beginning at the first passed string > and ending with (and including) the second passed string. C.f ›. ›Parse a nesting block comment. C.f. š. œMatch any character in a set.  vowel = charClass "aeiou" Range notation is supported.  "halfAlphabet = charClass "a-nA-N" To add a literal '-', to a set, place it at the beginning or end  of the string. CYou may also invert the set by placing a caret at the beginning of  the string.  nonVowel = "^aeiou" To add a literal '^', to a set, place it somewhere other than at ! the beginning of the string. HThe class of printable unicode characters, including linear whitesapce. 4 Accepts: Letter, Number, Symbol, Space, Punctuation/ Quote, Mark, Format, PrivateUse U Does not Accept: LineSeparator, ParagraphSeparator, Control, Surrogate, NotAssigned žAccepts characters from , except those which  satisfy the passed predicate. ŸHAccepts a wide variety of unicode characters. This is the largest class L of characters which might be used in a programming language that allows A unicode identifiers, and probably include a little too much. + Accepts: Letter, Mark, Number, Punctuation/Quote, Symbol E Does not Accept: Space, LineSeparator, ParagraphSeparator, Control, 3 Format, Surrogate, PrivateUse, NotAssigned  Accepts characters from Ÿ, except those which  satisfy the passed predicate. ¡3Parse a digit in the passed base: 2, 8, 10 or 16. ¢6Interpret a string as an integer in the passed base. £6Interpret a string as a mantissa in the passed base. WWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÊË1Whether a character is allowed in the identifier Whether the character is  disallowed* as the first character of the identifier €-The sigils and their corresponding semantics An identifier parser ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™šStart the block comment End the block comment ›Start a comment End a comment œžŸ ÌÍÎÏÐѡҢ£ÓS WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£S Z[\ ]^_`abc defghijklmnopqrstuvwyz{x|}WYX~€‚ƒ„…†‡ˆ‰Š‹¡¢£ŒŽ’“”•–‘—˜™š›œžŸ UWYXZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÊË€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÌÍÎÏÐѡҢ£Ó Safe-Inferredw ÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH  Safe-Inferred¤¥ over the identity monad. ¥.Type for Parsec parsers tracking indentation. ¦(Opaque type tracking indentation state. §Create a starting IndentationState: indentation is initially 8 enabled and the indentation depth stack starts with [0]. ¨;Succeed only when the indentation stack is suitably empty:  is empty or equal to [0]!, or if indentation is disabled. ©&The most general way to run a parser. "runParserIT p state filePath input  runs parser p on the input list of tokens input, obtained from source  filePath with the initial user state st. Indentation is initially * enabled and the depth stack begins as [0].  The filePath= is only used in error messages and may be the empty string. 2 Returns a computation in the underlying monad m that return either a   ParseError () or a value of type a ( ). ªAs © , but over the Identity monad. « Shortcut for © ¬ Shortcut for ª ­Parse an indent: as ~% ensuring the result is greater than E the current indentation level. Pushes the indentation depth stack. ®Parse an indent: as ~! ensuring the result is equal to ! the current indentation level. ¯Parse an indent: as ~" ensuring the result is less than C the current indentation level. Pops the indentation depth stack. Q Consumes no input, thus multiple dedents might be parsed at a single position. °As ¯, but also consume the ®. ) The leading whitespace is left intact. ± Test if indentation is enabled. ²&Obtain the current indentation depth. $ Fails if indentation is disabled. ³0Run the passed parser with indentation enabled. ´1Run the passed parser with indentation disabled. µ8Take a list of some linear whitespace tokens and return C a parser that advances over linear whitespace and blank lines. : Also, when indentation is disabled, also advance over {s. :You will almost always want to use this combinator before ­,  ® and ¯. to make sure indentation is always detected. D Actual linear whitespace is usually not enough: remember to add 7 parsers for comments as well. Line comments shouldn' t eat the  newline; the ™ combinator is acceptable. ¶Alternate version of Parsec's getState+ suited for indentation-sensitive parsers. ·Alternate version of Parsec's  puttState+ suited for indentation-sensitive parsers. ¸Alternate version of Parsec's  modifyState+ suited for indentation-sensitive parsers. ¹!Peek the top of the depth stack. º<Pop the top of the depth stack and return the popped depth. »$Push to the top of the depth stack. ¤¥¦    §¨©the parser to run Fwhat characters count as leading space and how they should be counted $a list of linear whitespace parsers an initial user state :name of the source file from which the input was gathered  input stream ªthe parser to run Fwhat characters count as leading space and how they should be counted $a list of linear whitespace parsers an initial user state :name of the source file from which the input was gathered  input stream «¬­®¯°±²³´µ¶·¸¹º»ZÔÕÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿWXY¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»$¥¤¦WYX©ª«¬µ­®¯°§¨±²³´¶·¸¹º»¤¥¦    §¨©ª«¬­®¯°±²³´µ¶·¸¹º»      !"#$%$&'(')'*'+','-'./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍ ÎÏÐÑÒÐÑÓÔÕÖרÙÚ]ÛÜÝÞßàáâãäåæçèéêëÊÉÈìíîïðñòóôõö÷øùúûüýþÿ   Ï   Ô <! luthor-0.0.1Text.Luthor.CombinatorText.Luthor.Syntax Text.LuthorText.Luthor.LexText.Luthor.IndentText.Parsec.Combinator optionMaybebaseControl.Applicative<**><**><*>pure Data.Functor<$> Control.MonadvoidGHC.Base<$ parsec-3.1.3countbetweenText.Parsec.CharanyCharcharoctDigithexDigitnoneOfoneOfText.Parsec.Primtry<|> unexpectedText.Parsec.ErrorerrorPos ParseErrorText.Parsec.Pos sourceColumn sourceLine sourceName SourceNameLineColumn SourcePos<$$><||>choicedispatch longestOfoptionoptional optional_atLeastatMostmanyNMmanyOfmanyOf_manymany1many1_many_manyTillmanyThruchompbetween2sepBysepBy1sepEndBy sepEndBy1endByendBy1 sepAroundBy sepAroundBy1chainlchainl1chainrchainr1 lookAhead lookAhead_ notFollowedBy atEndOfInput endOfInputallInputwithRemainingInputexpect withPositionwithPositionEnd withPositionsLuthorLexLexemeLuthorTLexT runLuthorT runLuthorlexemeignoresatisfy unlexWithunlex endOfLexemesisAtEnd IndentPolicyConvertDontMixstringcharIstringIaCharmanyChar many1CharupAlphaloAlphaalphadigitbinDigitctl asciiTextuniTextcrlfsphtsqdqcolon semicolondotcomma ellipsis2 ellipsis3bsEscyesnoyesnocrlflwsnewline lineBreakbsnlbsnlwsbs dentationmany1Not sigilizedinParens inBracketsinBracesinAnglesnumSignnumBase numNatural numAfterPointnumDenominator numOptSign numIntegerintegerrational scientifichexOctet letterEsccEscapes decimalEscasciiEscloUniEschiUniEscuniEscsqStringdqString lineComment blockCommentnestingComment charClassuniPrint uniPrintMinusuniId uniIdMinusxDigitstringToIntegerstringToMantissaParsecIParsecIT IndentState startIndent endIndent runParserIT runParserIrunPITrunPIindentnextlinededentdedent'isIndentEnabledgetIndentDepthwithIndentationwithoutIndentation plusBlanklinegetStateputState modifyStatepeekIndentationpopIndentationpushIndentation AlternativeParsecTghc-prim GHC.TypesTrueFalseStreamtransformers-0.3.0.0Data.Functor.IdentityIdentity Data.MaybeNothing EndOfLexemes_lexShow _lexUpdatePos _lexPayload_lexPos_wrap lexDentation _dentation_upAlpha_loAlpha_alpha_digit _alphaNum _asciiControlxDigits$fIsStringParsecT updateStatesetStateupdateParserStatesetParserStategetParserStatesetInput setPositiongetInput getPosition parseTestparse runParser runParserTrunPrunPT manyAccumskipMany tokenPrimEx tokenPrimtokentokenslabelslabel parserPlus parserZero parserFailmergeErrorReply parserBind parserReturn parsecMapmkPT runParsecTsysUnExpectError unknownErrorParsecConsumedEmptyOkErrorReply stateUserstatePos stateInputStateuncons Data.EitherLeftRightIS_policy_depth_enabled_ws_prepForDentation_withIndentationSet