h$}wB      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None  +  flatparseA pair of positions. flatparse9Byte offset counted backwards from the end of the buffer. flatparse  isDigit c = '0' <= c && c <= '9' flatparse isLatinLetter c = ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') flatparse isGreekLetter c = ('' <= c && c <= '') || ('' <= c && c <= '') flatparseRead an 4 from the input, as a non-empty digit sequence. The  may overflow in the result. flatparseRead an / from the input, as a non-empty digit sequence. flatparse Slice into a  using a . The result is invalid if the / is not a valid slice of the first argument. flatparse Convert a  to an UTF-8-coded .# flatparseDecorate a trie with the minimum lengths of non-empty paths. This is used later to place  ensureBytes#.$ flatparseCompress linear paths.% flatparseCompute where to fall back after we exhausted a branch. If the branch is empty, that means we've succeded at reading and we jump to the rhs rule.& flatparseDecorate with  ensureBytes#, invocations, represented as `Maybe Int`.(  !"#$%&'(   !"#$%&'None  +8/ flatparse1Higher-level boxed data type for parsing results.0 flatparse+Contains return value and unconsumed input.1 flatparseRecoverable-by-default failure.2 flatparseUnrecoverble-by-default error.3 flatparse Parser e a has an error type e and a return type a.6 flatparse flatparseSave the parsing state, then run a parser, then restore the state.? flatparse'Convert a parsing failure to a success.@ flatparse%Convert a parsing error into failure.A flatparseConvert a parsing failure to a . If possible, use C instead.B flatparseConvert a parsing failure to a ().C flatparseCPS'd version of A. This is usually more efficient, since it gets rid of the extra  allocation.D flatparse&Convert a parsing failure to an error.E flatparseRun the parser, if we get a failure, throw the given error, but if we get an error, merge the inner and the newly given errors using the  e -> e -> e function. This can be useful for implementing parsing errors which may propagate hints or accummulate contextual information.F flatparseSucceed if the input is empty.G flatparseParse a UTF-8 character literal. This is a template function, you can use it as  $(char 'x')4, for example, and the splice in this case has type  Parser e ().H flatparseRead a .I flatparseRead a sequence of bytes. This is a template function, you can use it as $(bytes [3, 4, 5])*, for example, and the splice has type  Parser e ().J flatparseParse a UTF-8 string literal. This is a template function, you can use it as $(string "foo")*, for example, and the splice has type  Parser e ().K flatparseThis is a template function which makes it possible to branch on a collection of string literals in an efficient way. By using K, such branching is compiled to a trie of primitive parsing operations, which has optimized control flow, vectorized reads and grouped checking for needed input bytes.7The syntax is slightly magical, it overloads the usual case expression. An example:  $(switch [| case _ of "foo" -> pure True "bar" -> pure False |]) The underscore is mandatory in  case _ of. Each branch must be a string literal, but optionally we may have a default case, like in  $(switch [| case _ of "foo" -> pure 10 "bar" -> pure 20 _ -> pure 30 |]) All case right hand sides must be parsers with the same type. That type is also the type of the whole K expression.A K has longest match semantics, and the order of cases does not matter, except for the default case, which may only appear as the last case.If a K does not have a default case, and no case matches the input, then it returns with failure, without having consumed any input. A fallthrough to the default case also does not consume any input.L flatparseSwitch expression with an optional first argument for performing a post-processing action after every successful branch matching. For example, if we have ws :: Parser e () for a whitespace parser, we might want to consume whitespace after matching on any of the switch cases. For that case, we can define a "lexeme" version of K as follows.  switch' :: Q Exp -> Q Exp switch' = switchWithPost (Just [| ws |]) Note that this switch' function cannot be used in the same module it's defined in, because of the stage restriction of Template Haskell.M flatparse Version of L without syntactic sugar. The second argument is the list of cases, the third is the default case.N flatparseParse a UTF-8  for which a predicate holds.O flatparse Skip a UTF-8  for which a predicate holds.P flatparseParse an ASCII  for which a predicate holds. Assumption: the predicate must only return  for ASCII-range characters. Otherwise this function might read a 128-255 range byte, thereby breaking UTF-8 decoding.Q flatparseSkip an ASCII  for which a predicate holds. Assumption: the predicate must only return  for ASCII-range characters.R flatparseThis is a variant of N which allows more optimization. We can pick four testing functions for the four cases for the possible number of bytes in the UTF-8 character. So in fusedSatisfy f1 f2 f3 f4, if we read a one-byte character, the result is scrutinized with f1, for two-bytes, with f29, and so on. This can result in dramatic lexing speedups.For example, if we want to accept any letter, the naive solution would be to use , but this accesses a large lookup table of Unicode character classes. We can do better with 5fusedSatisfy isLatinLetter isLetter isLetter isLetter, since here the  is inlined into the UTF-8 decoding, and it probably handles a great majority of all cases without accessing the character table.S flatparseSkipping variant of R.T flatparse Parse any .U flatparse Skip any .V flatparse Parse any .W flatparse Skip any .X flatparse Parse any .Y flatparse Skip any .Z flatparse Parse any .[ flatparse Skip any .\ flatparseParse any UTF-8-encoded .] flatparseSkip any UTF-8-encoded .^ flatparse Parse any  in the ASCII range, fail if the next input character is not in the range. This is more efficient than \# if we are only working with ASCII._ flatparse Skip any ) in the ASCII range. More efficient than ]% if we're working only with ASCII.` flatparseRead an 4 from the input, as a non-empty digit sequence. The  may overflow in the result.a flatparseRead an / from the input, as a non-empty digit sequence.b flatparseChoose between two parsers. If the first parser fails, try the second one, but if the first one throws an error, propagate the error.c flatparseBranch on a parser: if the first argument succeeds, continue with the second, else with the third. This can produce slightly more efficient code than b . Moreover,  a -> b* function. Note: this is not the usual d$ function from the parsec libraries!e flatparseAn analogue of the list  function: parse zero or more a-s, terminated by a b=, and combine the results in a right-nested way using the  a -> b -> b* function. Note: this is not the usual e$ function from the parsec libraries!f flatparseRun a parser zero or more times, collect the results in a list. Note: for optimal performance, try to avoid this. Often it is possible to get rid of the intermediate list by using a combinator or a custom parser.g flatparse!Skip a parser zero or more times.h flatparseRun a parser one or more times, collect the results in a list. Note: for optimal performance, try to avoid this. Often it is possible to get rid of the intermediate list by using a combinator or a custom parser.i flatparse Skip a parser one or more times.j flatparse>Succeed if the first parser succeeds and the second one fails.k flatparse&Get the current position in the input.l flatparseSet the input position. Warning: this can result in crashes if the position points outside the current buffer. It is always safe to l values which came from k with the current input.m flatparseThe end of the input.n flatparse%Return the consumed span of a parser.o flatparseBind the result together with the span of the result. CPS'd version of n for better unboxing.p flatparse Return the 8 consumed by a parser. Note: it's more efficient to use n and o instead.q flatparseCPS'd version of p. Can be more efficient, because the result is more eagerly unboxed by GHC. It's more efficient to use n or o instead.r flatparse?Run a parser in a given input span. The input position and the 7 state is restored after the parser is finished, so r does not consume input and has no side effect. Warning: this operation may crash if the given span points outside the current parsing buffer. It's always safe to use r# if the span comes from a previous o or n call on the current input.s flatparseCheck whether a  points into a .t flatparse7Compute corresponding line and column numbers for each  in a list. Throw an error on invalid positions. Note: computing lines and columns may traverse the , but it traverses it only once regardless of the length of the position list.u flatparse Create a  from a . The result is invalid if the 1 points outside the current buffer, or if the ( start is greater than the end position.v flatparse Create a  from a line and column number. Throws an error on out-of-bounds line and column numbers.w flatparseBreak an UTF-8-coded  to lines. Throws an error on invalid input. This is mostly useful for grabbing specific source lines for displaying error messages.x flatparse(Parse the rest of the current line as a . Assumes UTF-8 encoding, throws an error if the encoding is invalid.y flatparse(Parse the rest of the current line as a , but restore the parsing state. Assumes UTF-8 encoding. This can be used for debugging.z flatparse Take the rest of the input as a . Assumes UTF-8 encoding.{ flatparseGet the rest of the input as a , but restore the parsing state. Assumes UTF-8 encoding. This can be used for debugging.| flatparseConvert an UTF-8-coded  to a .} flatparse?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456978/102:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij klmnopqrstuvwxyz{|}~b6None  +@ flatparseA parsing error. flatparse:A precisely known error, like leaving out "in" from "let". flatparseAn imprecise error, when we expect a number of different things, but parse something else. flatparse6An expected item which is displayed in error messages. flatparseAn error message. flatparseA literal expected thing. flatparseMerge two errors. Inner errors (which were thrown at points with more consumed inputs) are preferred. If errors are thrown at identical input positions, we prefer precise errors to imprecise ones.The point of prioritizing inner and precise errors is to suppress the deluge of "expected" items, and instead try to point to a concrete issue to fix. flatparsePretty print an error. The  input is the source file. The offending line from the source is displayed in the output. flatparse7Imprecise cut: we slap a list of items on inner errors. flatparse1Precise cut: we propagate at most a single error. flatparse*Run parser, print pretty error on failure. flatparseParse a line comment. flatparse-Parse a potentially nested multiline comment. flatparseConsume whitespace. flatparse*Consume whitespace after running a parser. flatparse+Read a starting character of an identifier. flatparse/Read a non-starting character of an identifier. flatparseCheck whether a ; contains exactly a keyword. Does not change parsing state. flatparseParse a non-keyword string. flatparse e -> e function. This can be useful for implementing parsing errors which may propagate hints or accummulate contextual information. flatparseSucceed if the input is empty. flatparseParse a UTF-8 character literal. This is a template function, you can use it as  $(char 'x')4, for example, and the splice in this case has type  Parser e (). flatparse Read a byte. flatparseRead a sequence of bytes. This is a template function, you can use it as $(bytes [3, 4, 5])*, for example, and the splice has type  Parser e (). flatparseParse a UTF-8 string literal. This is a template function, you can use it as $(string "foo")*, for example, and the splice has type  Parser e (). flatparseThis is a template function which makes it possible to branch on a collection of string literals in an efficient way. By using , such branching is compiled to a trie of primitive parsing operations, which has optimized control flow, vectorized reads and grouped checking for needed input bytes.7The syntax is slightly magical, it overloads the usual case expression. An example:  $(switch [| case _ of "foo" -> pure True "bar" -> pure False |]) The underscore is mandatory in  case _ of. Each branch must be a string literal, but optionally we may have a default case, like in  $(switch [| case _ of "foo" -> pure 10 "bar" -> pure 20 _ -> pure 30 |]) All case right hand sides must be parsers with the same type. That type is also the type of the whole  expression.A  has longest match semantics, and the order of cases does not matter, except for the default case, which may only appear as the last case.If a  does not have a default case, and no case matches the input, then it returns with failure, without having consumed any input. A fallthrough to the default case also does not consume any input. flatparseSwitch expression with an optional first argument for performing a post-processing action after every successful branch matching. For example, if we have ws :: Parser e () for a whitespace parser, we might want to consume whitespace after matching on any of the switch cases. For that case, we can define a "lexeme" version of  as follows.  switch' :: Q Exp -> Q Exp switch' = switchWithPost (Just [| ws |]) Note that this switch' function cannot be used in the same module it's defined in, because of the stage restriction of Template Haskell. flatparse Version of  without syntactic sugar. The second argument is the list of cases, the third is the default case. flatparseParse a UTF-8  for which a predicate holds. flatparse Skip a UTF-8  for which a predicate holds. flatparseParse an ASCII  for which a predicate holds. Assumption: the predicate must only return  for ASCII-range characters. Otherwise this function might read a 128-255 range byte, thereby breaking UTF-8 decoding. flatparseSkip an ASCII  for which a predicate holds. Assumption: the predicate must only return  for ASCII-range characters. flatparseThis is a variant of  which allows more optimization. We can pick four testing functions for the four cases for the possible number of bytes in the UTF-8 character. So in fusedSatisfy f1 f2 f3 f4, if we read a one-byte character, the result is scrutinized with f1, for two-bytes, with f29, and so on. This can result in dramatic lexing speedups.For example, if we want to accept any letter, the naive solution would be to use , but this accesses a large lookup table of Unicode character classes. We can do better with 5fusedSatisfy isLatinLetter isLetter isLetter isLetter, since here the  is inlined into the UTF-8 decoding, and it probably handles a great majority of all cases without accessing the character table. flatparseSkipping variant of . flatparseParse any byte. flatparseSkip any byte. flatparse Parse any Word16. flatparse Skip any Word16. flatparse Parse any Word32. flatparse Skip any Word32. flatparse Parse any . flatparse Skip any . flatparseParse any UTF-8-encoded . flatparseSkip any UTF-8-encoded . flatparse Parse any  in the ASCII range, fail if the next input character is not in the range. This is more efficient than # if we are only working with ASCII. flatparse Skip any ) in the ASCII range. More efficient than % if we're working only with ASCII. flatparseRead an 4 from the input, as a non-empty digit sequence. The  may overflow in the result. flatparseRead an / from the input, as a non-empty digit sequence. flatparseChoose between two parsers. If the first parser fails, try the second one, but if the first one throws an error, propagate the error. flatparseBranch on a parser: if the first argument succeeds, continue with the second, else with the third. This can produce slightly more efficient code than  . Moreover,  a -> b* function. Note: this is not the usual $ function from the parsec libraries! flatparseAn analogue of the list  function: parse zero or more a-s, terminated by a b=, and combine the results in a right-nested way using the  a -> b -> b* function. Note: this is not the usual $ function from the parsec libraries! flatparseRun a parser zero or more times, collect the results in a list. Note: for optimal performance, try to avoid this. Often it is possible to get rid of the intermediate list by using a combinator or a custom parser. flatparse!Skip a parser zero or more times. flatparseRun a parser one or more times, collect the results in a list. Note: for optimal performance, try to avoid this. Often it is possible to get rid of the intermediate list by using a combinator or a custom parser. flatparse Skip a parser one or more times. flatparseSucceed if the first parser succeeds and the second one fails. The parsing state is restored to the point of the first argument's success. flatparse&Get the current position in the input. flatparseSet the input position. Warning: this can result in crashes if the position points outside the current buffer. It is always safe to  values which came from  with the current input. flatparseThe end of the input. flatparse*Return the consumed span of a parser. Use # if possible for better efficiency. flatparseBind the result together with the span of the result. CPS'd version of  for better unboxing. flatparse Return the 8 consumed by a parser. Note: it's more efficient to use  and  instead. flatparseCPS'd version of . Can be more efficient, because the result is more eagerly unboxed by GHC. It's more efficient to use  or  instead. flatparse Create a  from a . The result is invalid is the 1 points outside the current buffer, or if the ( start is greater than the end position. flatparse?Run a parser in a given input span. The input position and the 7 state is restored after the parser is finished, so  does not consume input and has no side effect. Warning: this operation may crash if the given span points outside the current parsing buffer. It's always safe to use # if the span comes from a previous  or  call on the current input. flatparse(Parse the rest of the current line as a . Assumes UTF-8 encoding, throws an error if the encoding is invalid. flatparse(Parse the rest of the current line as a , but restore the parsing state. Assumes UTF-8 encoding. This can be used for debugging. flatparse Take the rest of the input as a . Assumes UTF-8 encoding. flatparseGet the rest of the input as a , but restore the parsing state. Assumes UTF-8 encoding. This can be used for debugging. flatparseConvert an UTF-8-coded  to a . flatparse?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~:J@6789::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuyv|}~(flatparse-0.3.2.0-7JTZ2Bomnv5BxPfbLH7H5jFlatParse.InternalFlatParse.Basic$FlatParse.Examples.BasicLambda.Lexer%FlatParse.Examples.BasicLambda.ParserFlatParse.Stateful Data.CharisLetterPaths_flatparseTrie'Branch'PathRuleTrieBranchSpanPos shortIntegerindexWord8OffAddrindexWord16OffAddrindexWord32OffAddrindexWord64OffAddrisDigit isLatinLetter isGreekLettermul10readInt'readInt readInteger addrToPos# posToAddr# unsafeSlicepackUTF8 charToBytes strToBytes packBytes splitBytes derefChar8#nilTrieupdRuleinsert listToTrie mindepthspathify fallbacks ensureBytes compileTrie$fOrdPos $fShowTrie' $fShowTrie$fEqSpan $fShowSpan$fEqPos $fShowPosResultOKFailErrParser runParser#Res#Fail#Err#OK# runParser runParserSemptyerr lookaheadfailstryoptional optional_optionedcutcuttingeofcharbytebytesstringswitchswitchWithPostrawSwitchWithPostsatisfysatisfy_ satisfyASCII satisfyASCII_ fusedSatisfy fusedSatisfy_anyWord8 anyWord8_ anyWord16 anyWord16_ anyWord32 anyWord32_anyWordanyWord_anyCharanyChar_ anyCharASCII anyCharASCII_<|>branchchainlchainrmanymany_somesome_ notFollowedBygetPossetPosendPosspanOfspanned byteStringOf byteStringedinSpanvalidPos posLineColsunsafeSpanToByteStringmkPoslinestakeLine traceLinetakeRest traceRest unpackUTF8 ensureBytes#scan8#scan16#scan32#scan64# scanAny8#setBack# scanBytes# $fMonadParser$fApplicativeParser$fFunctorParser$fFunctorResult $fShowResultErrorPrecise ImpreciseExpectedMsgLiterrorPosmerge prettyErrorcut' testParser lineCommentmultilineCommentwstokenidentStartChar identChar isKeywordsymbolsymbol'keywordkeyword'$fIsStringExpected $fShowError $fEqExpected$fShowExpected $fOrdExpectedTmVarAppLamLetBoolLitIntLitIfAddMulEqLtNameidentident'digitintatomatom'app'mul'add'eqLt'pLetlampIftm'src'p1$fShowTmgetputmodifyasklocalghc-prim GHC.TypesIntinteger-wired-inGHC.Integer.TypeIntegerbytestring-0.10.10.0Data.ByteString.Internal ByteStringbaseGHC.BaseString GHC.MaybeMaybeGHC.WordWord8CharTrueWord16Word32Word Data.Foldablefoldlfoldrversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName