h, V      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                  9.7.0& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe8=? D The data type  represents source positions. It contains the name of the source file, a line number, and a column number. Source line and column positions change intensively during parsing, so we need to make them strict to avoid memory leaks. Column number Line numberName of source file megaparsecThe exception is thrown by - when its argument is not a positive number.-Contains the actual value that was passed to  megaparsec is the type for positive integers. This is used to represent line number, column number, and similar things like indentation level. 4 instance can be used to safely and efficiently add  es together. megaparsecConstruction of  from . The function throws $ when given a non-positive argument.  megaparsecExtract  from .  megaparsecPosition with value 1.  megaparsecValue of tab width used by default. Always prefer this constant when you want to refer to the default tab width because actual value may change in future. Currently: defaultTabWidth = mkPos 8 Construct initial position (line 1, column 1) given name of source file.  megaparsecPretty-print a .     2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe78=x ' megaparsecA special kind of state that is used to calculate line/column positions on demand.)#Prefix to prepend to offending line*'Tab width to use for column calculation+.Source position corresponding to beginning of -,%Offset corresponding to beginning of --The rest of input to process.=This is the Megaparsec's state parametrized over stream type s" and custom error component type e.0 megaparsecCollection of @delayed@ &s in reverse order. This means that the last registered error is the first element of the list.1 megaparsec.State that is used for line/column calculation2 megaparsec!Number of processed tokens so far3The rest of input to process4 megaparsec Given the name of the source file and the input construct the initial state for a parser.5 megaparsec Given the name of source file and the input construct the initial positional state.4)Name of the file the input is coming fromInput5)Name of the file the input is coming fromInput54'(-),+*./3201./32104'(-,+*)5& 2024@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafey# megaparsec Calculate length of a string taking into account the fact that certain s may span more than 1 column.$ megaparsec Return length of an individual .% megaparsec Determine whether the given  is @wide@, that is, whether it spans 2 columns instead of one.Wide character ranges.$%##$%& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&3!5An internal helper state type combining a difference  and an unboxed .@ megaparsec Type class for inputs that can also be used for error reporting.A megaparsecGiven an offset o and initial '?, adjust the state in such a way that it starts at the offset.Return two values (in order): 8 representing the line on which the given offset o% is located. It can be omitted (i.e. ); in that case error reporting functions will not show offending lines. If returned, the line should satisfy a number of conditions that are described below. The updated '; which can be in turn used to locate another offset o' given that o' >= o.The  representing the offending line in input stream should satisfy the following:It should adequately represent location of token at the offset of interest, that is, character at  of the returned . should correspond to the token at the offset o.-It should not include the newline at the end.It should not be empty, if the line happens to be empty, it should be replaced with the string "".Tab characters should be replaced by appropriate number of spaces, which is determined by the * field of '.Note=: type signature of the function was changed in the version 9.0.0.B megaparsec A version of A that may be faster because it doesn't need to fetch the line at which the given offset in located.#The default implementation is this: 3reachOffsetNoLine o pst = snd (reachOffset o pst)Note=: type signature of the function was changed in the version 8.0.0.C megaparsec :Type class for inputs that can also be used for debugging.D megaparsecPretty-print non-empty stream of tokens. This function is also used to print single tokens (represented as singleton lists).E megaparsecReturn the number of characters that a non-empty stream of tokens spans. The default implementation is sufficient if every token spans exactly 1 character.F megaparsec *This wrapper selects the no-input-sharing L implementation for  () and  (). This means that our parsers will create independent copies rather than using slices of the input. See also the documentation of .More importantly, any parser output will be independent of the input, and holding on to parts of the output will never prevent the input from being garbage collected.1For maximum performance you might consider using I& instead, but beware of its pitfalls!I megaparsec 'This wrapper selects the input-sharing L implementation for  () and  (). By input sharing we mean that our parsers will use slices whenever possible to avoid having to copy parts of the input. See also the documentation of .Note that using slices is in general faster than copying; on the other hand it also has the potential for causing surprising memory leaks: if any slice of the input survives in the output, holding on to the output will force the entire input /* to stay in memory! Even when using lazy / we will hold on to whole chunks at a time leading to to significantly worse memory residency in some cases.See F for a somewhat slower implementation that avoids this memory leak scenario.L:Type class for inputs that can be consumed by the library.Note that the L instances for Text and  ByteString4 (strict and lazy) default to "input sharing" (see I, F). We plan to move away from input sharing in a future major release; if you want to retain the current behaviour and are concerned with maximum performance you should consider using the I wrapper explicitly.Note: before the version 9.0.0& the class included the methods from C and @.MType of token in the stream.NType of @chunk@ of the stream.OLift a single token to chunk of the stream. The default implementation is: +tokenToChunk pxy = tokensToChunk pxy . pureHowever for some types of stream there may be a more efficient way to lift.PThe first method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: .chunkToTokens pxy (tokensToChunk pxy ts) == tsQThe second method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: 4tokensToChunk pxy (chunkToTokens pxy chunk) == chunkR'Return length of a chunk of the stream.SCheck if a chunk of the stream is empty. The default implementation is in terms of the more general R: +chunkEmpty pxy ts = chunkLength pxy ts <= 0However for many streams there may be a more efficient implementation.T/Extract a single token form the stream. Return  if the stream is empty.UU n s) should try to extract a chunk of length n, or if the stream is too short, the rest of the stream. Valid implementation should follow the rules:If the requested length n is 0 (or less), * should never be returned, instead  ("", s)" should be returned, where ""! stands for the empty chunk, and s1 is the original stream (second argument).If the requested length is greater than 0 and the stream is empty, , should be returned indicating end of input.%In other cases, take chunk of length n (or shorter if the stream is not long enough) from the input stream and return the chunk along with the rest of the stream.VExtract chunk of the stream taking tokens while the supplied predicate returns .. Return the chunk and the rest of the stream.For many types of streams, the method allows for significant performance improvements, although it is not strictly necessary from conceptual point of view.9Create an independent copy of a TL.Text, akin to BL.copy.+A helper definition to facilitate defining A for various stream types.Like  but for B.Like  but accepts the index as an .Like  but accepts the index as an .stringPretty s) returns pretty representation of string s>. This is used when printing string tokens in error messages. charPretty ch returns user-friendly string representation of given character ch', suitable for using in error messages.If the given character has a pretty representation, return that, otherwise . This is an internal helper.3Replace tab characters with given number of spaces.Return increment in column position that corresponds to the given .Return increment in column position that corresponds to the given .Y megaparsec Z megaparsec AOffset to reachInitial ' to use#See the description of the functionBOffset to reachInitial ' to use)Reached source position and updated state )How to split input stream at given offsetHow to fold over input stream,How to convert chunk of input stream into a How to convert a token into a Newline token and tab token(Increment in column position for a tokenOffset to reachInitial ' to useLine at which  is located, updated ')How to split input stream at given offsetHow to fold over input streamNewline token and tab token;Offset to reach | Increment in column position for a tokenInitial ' to useUpdated 'XmnWgFGHIJKLMNSRQTUVOP@ABCDELMNOPQRSTUVWXIJKFGHCDEg@ABmn& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&78:=GP!& megaparsec& s e= represents a parse error parametrized over the stream type s and the custom data e. and  instances of the data type allow us to merge parse errors from different branches of parsing. When merging two &s, the longest match is preferred; if positions are the same, custom data sets and collections of message items are combined. Note that fancy errors take precedence over trivial errors in merging.t megaparsec:The type class defines how to print a custom component of &.uPretty-print a component of &.v megaparsecLength of the error component in characters, used for highlighting of parse errors in input string.w megaparsecA non-empty collection of &s equipped with ' that allows us to pretty-print the errors efficiently and correctly.y2The state that is used for line/column calculationzA collection of &'s that is sorted by parse error offsets{Trivial errors, generated by the Megaparsec's machinery. The data constructor includes the offset of error, unexpected token (if any), and expected tokens.6Type of the first argument was changed in the version 7.0.0.|Fancy, custom errors.6Type of the first argument was changed in the version 7.0.0.} megaparsecAdditional error data, extendable by user. When no custom data is necessary, the type is typically indexed by  to @cancel@ the  constructor.~ has been used in parser monadIncorrect indentation error: desired ordering between reference level and actual level, reference indentation level, actual indentation levelCustom error data megaparsecA data type that is used to represent @unexpected/expected@ items in &). It is parametrized over the token type t.Non-empty stream of tokensLabel (cannot be empty) End of input megaparsecModify the custom data component in a parse error. This could be done via  if not for the  constraint. megaparsecGet the offset of a &. megaparsecSet the offset of a &.Merge two error data structures into one joining their collections of message items and preferring the longest match. In other words, earlier error message is discarded. This may seem counter-intuitive, but  is only used to merge error messages of alternative branches of parsing and in this case longest match should be preferred. megaparsecAttach es to items in a  container given that there is a projection allowing us to get an offset per item.?Items must be in ascending order with respect to their offsets. megaparsec Pretty-print a w. All &s in the bundle will be pretty-printed in order, by applying a provided format function, with a single pass over the input stream. megaparsecPretty-print a w. All &s in the bundle will be pretty-printed in order together with the corresponding offending lines by doing a single pass over the input stream. The rendered  always ends with a newline. megaparsec Pretty-print a w. All &s in the bundle will be pretty-printed in order by doing a single pass over the input stream.The rendered format is suitable for custom GHC pre-processors (as can be specified with -F -pgmF). megaparsecPretty-print a &. The rendered  always ends with a newline. megaparsec!Pretty-print a textual part of a &=, that is, everything except for its position. The rendered  always ends with a newline. megaparsec Pretty-print an .5Get length of the @pointer@ to display under a given .Pretty-print an }.5Get length of the @pointer@ to display under a given }.Transform a list of error messages into their textual representation.Print a pretty list where items are separated with commas and the word @or@ according to the rules of English punctuation.)How to project offset from an item (e.g. )The collection of itemsInitial 'The collection with es added and the final 'Format function for a single &Parse error bundle to displayTextual rendition of the bundleParse error bundle to displayTextual rendition of the bundleParse error bundle to displayTextual rendition of the bundleParse error to renderResult of renderingParse error to renderResult of renderingPrefix to prependCollection of messagesResult of rendering}~&|{wxzytvu}~&{|wxzytuv& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe78=M6Auxiliary type for construction of fancy parse errors.8Auxiliary type for construction of trivial parse errors. Assemble a & from the offset and the  t value.  t is a monoid and can be assembled by combining primitives provided by this module, see below.Like , but constructs a @fancy@ &.0Construct an @unexpected token@ error component.Construct an @unexpected tokens@ error component. Empty chunk produces .Construct an @unexpected label@ error component. Do not use with empty strings (for empty strings it's bottom).7Construct an @unexpected end of input@ error component..Construct an @expected token@ error component.Construct an @expected tokens@ error component. Empty chunk produces .Construct an @expected label@ error component. Do not use with empty strings.5Construct an @expected end of input@ error component.#Construct a custom error component.Construct the appropriate  representation for the given token stream. The empty string produces .Lift an unexpected item into .Lift an expected item into .-Make a singleton non-empty list from a value.& offsetError components Resulting && offsetError components Resulting &   2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafem"Type class describing monads that implement the full set of primitive parsers.Note that the following primitives are @fast@ and should be taken advantage of as much as possible if your aim is a fast parser: , , , and . megaparsecStop parsing and report the &. This is the only way to control position of the error without manipulating the parser state manually. The parser  name p behaves as parser p, but whenever the parser p fails without consuming any input8, it replaces names of @expected@ tokens with the name name. p behaves just like parser p, but it doesn't show any @expected@ tokens in error message when p fails. Please use  instead of the old  "" idiom. The parser  p behaves like the parser p3, except that it backtracks the parser state when p( fails (either consuming input or not).This combinator is used whenever arbitrary look ahead is needed. Since it pretends that it hasn't consumed any input when p fails, the ( !) combinator will try its second alternative even if the first parser failed while consuming input.For example, here is a parser that is supposed to parse the word @let@ or the word @lexical@:7parseTest (string "let" <|> string "lexical") "lexical"1:1:unexpected "lex"expecting "let"What happens here? The first parser consumes @le@ and fails (because it doesn't see a @t@). The second parser, however, isn't tried, since the first parser has already consumed some input! 6 fixes this behavior and allows backtracking to work:=parseTest (try (string "let") <|> string "lexical") "lexical" "lexical" also improves error messages in case of overlapping alternatives, because Megaparsec's hint system can be used:8parseTest (try (string "let") <|> string "lexical") "le"1:1:unexpected "le"expecting "let" or "lexical"Note that as of Megaparsec 4.4.0,  " backtracks automatically (see ), so it does not need ;. However, the examples above demonstrate the idea behind  so well that it was decided to keep them. You still need to use 8 when your alternatives are complex, composite parsers.If p in  p succeeds (either consuming input or not) the whole parser behaves like p succeeded without consuming anything (parser state is not updated as well). If p fails, 6 has no effect, i.e. it will fail consuming input if p& fails consuming input. Combine with  if this is undesirable. p only succeeds when the parser p fails. This parser never consumes any input and never modifies parser state. It can be used to implement the @longest match@ rule. megaparsec r p3 allows us to continue parsing even if the parser p fails. In this case r is called with the actual & as its argument. Typical usage is to return a value signifying failure to parse this particular object and to consume some part of the input up to the point where the next object starts. Note that if r> fails, the original error message is reported as if without . In no way recovering parser r can influence error messages. megaparsec p' allows us to @observe@ failure of the p parser, should it happen, without actually ending parsing but instead getting the & in *. On success parsed value is returned in  as usual. Note that this primitive just allows you to observe parse errors as they happen, it does not backtrack or change how the p parser works in any way..This parser only succeeds at the end of input. The parser  test expected1 accepts tokens for which the matching function test returns  results. If  is returned the expected5 set is used to report the items that were expected.For example, the # parser is implemented as: satisfy f = token testToken Set.empty where testToken x = if f x then Just x else NothingNote?: type signature of this primitive was changed in the version 7.0.0. The parser  test chk parses a chunk of input chk) and returns it. The supplied predicate test is used to check equality of given and parsed chunks after a candidate chunk of correct length is fetched from the stream.&This can be used for example to write $: chunk = tokens (==)Note that beginning from Megaparsec 4.4.0, this is an auto-backtracking primitive, which means that if it fails, it never consumes any input. This is done to make its consumption model match how error messages for this primitive are reported (which becomes an important thing as user gets more control with primitives like ):parseTest (string "abc") "abd"1:1:unexpected "abd"expecting "abc"This means, in particular, that it's no longer necessary to use  with -based parsers, such as  " and  %. This feature does not affect performance in any way. megaparsecParse zero or more tokens for which the supplied predicate holds. Try to use this as much as possible because for many streams this combinator is much faster than parsers built with &' and #. takeWhileP (Just "foo") f = many (satisfy f "foo") takeWhileP Nothing f = many (satisfy f)The combinator never fails, although it may parse the empty chunk. megaparsec Similar to , but fails if it can't parse at least one token. Try to use this as much as possible because for many streams this combinator is much faster than parsers built with &( and #. takeWhile1P (Just "foo") f = some (satisfy f "foo") takeWhile1P Nothing f = some (satisfy f)Note that the combinator either succeeds or fails without consuming any input, so  is not necessary with it. megaparsecExtract the specified number of tokens from the input stream and return them packed as a chunk of stream. If there is not enough tokens in the stream, a parse error will be signaled. It's guaranteed that if the parser succeeds, the requested number of tokens will be returned.$The parser is roughly equivalent to: takeP (Just "foo") n = count n (anySingle "foo") takeP Nothing n = count n anySingleNote that if the combinator fails due to insufficient number of tokens in the input stream, it backtracks automatically. No  is necessary with ."Return the full parser state as a . record. f applies the function f to the parser state. megaparsec $An escape hatch for defining custom & primitives. You will need to import Text.Megaparsec.Internal in order to construct . megaparsec megaparsecHow to recover from failureOriginal parser%Parser that can recover from failuresThe parser to run(Matching function for the token to parseUsed in the error message to mention the items that were expected%Predicate to check equality of chunksChunk of input to match against"Name for a single token in the rowPredicate to use to test tokensA chunk of matching tokens"Name for a single token in the rowPredicate to use to test tokensA chunk of matching tokens"Name for a single token in the rowHow many tokens to extractA chunk of matching tokens) 2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe:{All information available after parsing. This includes consumption of input, success (with the returned value) or failure (with the parse error), and parser state at the end of parsing. % can also be used to resume parsing. See also: , . e s m a2 is a parser with custom data component of error e, stream type s, underlying monad m and return type a.Whether the parser has failed or not. On success we include the resulting value, on failure we include a &. See also: , .!Parser succeeded (includes hints) Parser failed+Whether the input has been consumed or not. See also: , .&Some part of input stream was consumedNo input was consumed represent a collection of s to be included into & (when it's a {) as @expected@ message items when a parser fails without consuming input right after successful parser that produced the hints.)For example, without hints you could get:'parseTest (many (char 'r') <* eof) "ra"1:2:unexpected 'a'expecting end of input;We're getting better error messages with the help of hints:'parseTest (many (char 'r') <* eof) "ra"1:2:unexpected 'a'expecting 'r' or end of inputFrom two states, return the one with the greater number of processed tokens. If the numbers of processed tokens are equal, prefer the second state. Convert a & record into . hs c makes @error@ continuation c use given hints hs.Note% that if resulting continuation gets &0 that has custom data in it, hints are ignored. hs c9 results in @OK@ continuation that will add given hints hs, to third argument of original continuation c.!Replace the hints with the given  (or delete it if ! is given). This is used in the  primitive.Low-level unpacking of the  type. megaparsecTransform any custom errors thrown by the parser using the given function. Similar in function and purpose to  withExceptT.Note that the inner parser will start with an empty collection of @delayed@ &s. Any delayed &s produced in the inner parser will be lifted by applying the provided function and added to the collection of delayed parse errors of the outer parser. megaparsec is a parser that fails without consuming input.Note: strictly speaking, this instance is unlawful. The right identity law does not hold, e.g. in general this is not true: v >> mzero = mzeroHowever the following holds: try v >> mzero = mzero megaparsec  returns a parser that succeeds without consuming input. is a parser that fails without consuming input. returns a parser that succeeds without consuming input. megaparsec megaparsec megaparsecCurrent offset in input streamParse error to convert Hints to useContinuation to influence(First argument of resulting continuation)Second argument of resulting continuation to addAn @OK@ continuation to alterAltered @OK@ continuation Parser to run Initial state Inner parser Outer parser & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableUnsafeA wrapper type with a dummy  instance.+A single piece of info to be rendered with .'A wrapper with a special show instance:0show (ShowComment "STATE" ("Hello, world!", 42))Hello, world! (STATE: 42) megaparsec Type class describing parser monads that can trace during evaluation. label p parser works exactly like p, but when it's evaluated it prints information useful for debugging. The label is only used to refer to this parser in the debugging output. This combinator uses the  function from  Debug.Trace under the hood.Typical usage is to wrap every sub-parser in misbehaving parser with  assigning meaningful labels. Then give it a shot and go through the print-out. As of current version, this combinator prints all available information except for hints, which are probably only interesting to the maintainer of Megaparsec itself and may be quite verbose to output in general. Let me know if you would like to be able to see hints in the debugging output.The output itself is pretty self-explanatory, although the following abbreviations should be clarified (they are derived from the low-level source code):COK8@@consumed OK@. The parser consumed input and succeeded.CERR8@@consumed error@. The parser consumed input and failed.EOK:@@empty OK@. The parser succeeded without consuming input.EERR:@@empty error@. The parser failed without consuming input.Note: up until the version 9.3.0: this was a non-polymorphic function that worked only in *. It was first introduced in the version 7.0.0. label_a label_c m7 traces the first component of the result produced by m with label_a and the second component with label_b.(Render a single piece of debugging info.Pretty-print a list of tokens.*Calculate number of consumed tokens given .% of parser before and after parsing.1Extract a given number of tokens from the stream. megaparsec  Just like <, but doesn't require the return value of the parser to be -able.dbg (p :: WriterT st m) prints only log produced by p:0p = tell [0] >> dbg "a" (single 'a' >> tell [1])parseTest (runWriterT p) "a" a> IN: 'a'a> MATCH (COK): 'a'a> VALUE: () (LOG: [1]) ((),[0,1])dbg (p :: WriterT st m) prints only log produced by p:0p = tell [0] >> dbg "a" (single 'a' >> tell [1])parseTest (runWriterT p) "a" a> IN: 'a'a> MATCH (COK): 'a'a> VALUE: () (LOG: [1]) ((),[0,1])dbg (p :: StateT st m) prints state after running p:6p = modify succ >> dbg "a" (single 'a' >> modify succ)parseTest (runStateT p 0) "a" a> IN: 'a'a> MATCH (COK): 'a'a> VALUE: () (STATE: 2)((),2)dbg (p :: StateT st m) prints state after running p:6p = modify succ >> dbg "a" (single 'a' >> modify succ)parseTest (runStateT p 0) "a" a> IN: 'a'a> MATCH (COK): 'a'a> VALUE: () (STATE: 2)((),2)RWST works like StateT inside a WriterT2: subparser's log and its final state is printed:p = tell [0] >> modify succ >> dbg "a" (single 'a' >> tell [1] >> modify succ)parseTest (runRWST p () 0) "a" a> IN: 'a'a> MATCH (COK): 'a'"a> VALUE: () (STATE: 2) (LOG: [1]) ((),2,[0,1])RWST works like StateT inside a WriterT2: subparser's log and its final state is printed:p = tell [0] >> modify succ >> dbg "a" (single 'a' >> tell [1] >> modify succ)parseTest (runRWST p () 0) "a" a> IN: 'a'a> MATCH (COK): 'a'"a> VALUE: () (STATE: 2) (LOG: [1]) ((),2,[0,1])Debugging labelParser to debug%Parser that prints debugging messagesDebugging label (for a)Extra component label (for c)Parser to debug%Parser that prints debugging messagesDebugging labelInformation to renderRendered result"State of parser before consumption!State of parser after consumptionNumber of consumed tokensDebugging labelParser to debug%Parser that prints debugging messages 2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe i!2 is a non-transformer variant of the more general  monad transformer. p file input runs parser p over  (see  if you're using the  monad transformer;  itself is just a synonym for ). It returns either a w () or a value of type a ().  can be used to turn w; into the string representation of the error message. See Text.Megaparsec.Error1 if you need to do more advanced error analysis. main = case parse numbers "" "11,2,43" of Left bundle -> putStr (errorBundlePretty bundle) Right xs -> print (sum xs) numbers = decimal `sepBy` char ',' is the same as . p input runs the parser p on input and returns the result inside  on success and ( on failure. This function also parses , so if the parser doesn't consume all of its input, it will fail.The function is supposed to be useful for lightweight parsing, where error messages (and thus file names) are not important and entire input should be consumed. For example, it can be used for parsing of a single number according to a specification of its format.The expression  p input applies the parser p on the input input5 and prints the result to stdout. Useful for testing. p file input runs parser p on the input stream of tokens input, obtained from source file. The file is only used in error messages and may be the empty string. Returns either a w () or a value of type a (). 9parseFromFile p file = runParser p file <$> readFile file is the same as . megaparsecThe function is similar to  with the difference that it accepts and returns the parser state. This allows us e.g. to specify arbitrary textual position at the beginning of parsing. This is the most general way to run a parser over the  monad. p file input runs parser p on the input list of tokens input, obtained from source file. The file is only used in error messages and may be the empty string. Returns a computation in the underlying monad m that returns either a w () or a value of type a (). megaparsecThis function is similar to  , but like  it accepts and returns parser state. This is thus the most general way to run a parser. megaparsec"Stop parsing and report a trivial &. megaparsec Stop parsing and report a fancy &.. To report a single custom parse error, see *. The parser  item< fails with an error message telling about unexpected item item without consuming any input. /unexpected item = failure (Just item) Set.empty megaparsec>Report a custom parse error. For a more general version, see . :customFailure = fancyFailure . Set.singleton . ErrorCustom megaparsecSpecify how to process &s that happen inside of this wrapper. This applies to both normal and delayed &s.As a side-effect of the implementation the inner computation will start with an empty collection of delayed errors and they will be updated and @restored@ on the way out of . megaparsec Register a & for later reporting. This action does not end parsing and has no effect except for adding the given &! to the collection of @delayed@ &s which will be taken into consideration at the end of parsing. Only if this collection is empty the parser will succeed. This is the main way to report several parse errors at once. megaparsecLike , but for delayed &s. megaparsecLike , but for delayed &s. megaparsec t only matches the single token t. semicolon = single ';' See also: , ,  +,  +. megaparsec The parser  f9 succeeds for any token for which the supplied function f returns . digitChar = satisfy isDigit "digit" oneOf cs = satisfy (`elem` cs)Performance note: when you need to parse a single token, it is often a good idea to use  with the right predicate function instead of creating a complex parser using the combinators. See also: , , , . megaparsec>Parse and return a single token. It's a good idea to attach a  to this parser.  anySingle = satisfy (const True) See also: , . megaparsecMatch any token but the given one. It's a good idea to attach a  to this parser. anySingleBut t = satisfy (/= t) See also: , , . megaparsec ts succeeds if the current token is in the supplied collection of tokens ts. Returns the parsed token. Note that this parser cannot automatically generate the @expected@ component of error message, so usually you should label it manually with  or (). oneOf cs = satisfy (`elem` cs) See also: . $digit = oneOf ['0'..'9'] "digit"Performance note : prefer  when you can because it's faster when you have only a couple of tokens to compare to: quoteFast = satisfy (\x -> x == '\'' || x == '\"') quoteSlow = oneOf "'\"" megaparsecAs the dual of ,  ts succeeds if the current token not in the supplied list of tokens ts. Returns the parsed character. Note that this parser cannot automatically generate the @expected@ component of error message, so usually you should label it manually with  or (). "noneOf cs = satisfy (`notElem` cs) See also: .Performance note : prefer  and # when you can because it's faster. megaparsec chk only matches the chunk chk. &divOrMod = chunk "div" <|> chunk "mod" See also: ,  ",  ".A synonym for  in the form of an operator. megaparsecReturn both the result of a parse and a chunk of input that was consumed during parsing. This relies on the change of the 2 value to evaluate how many tokens were consumed. If you mess with it manually in the argument parser, prepare for troubles. megaparsecConsume the rest of the input and return it as a chunk. This parser never fails, but may return the empty chunk. *takeRest = takeWhileP Nothing (const True) megaparsecReturn $ when end of input has been reached. )atEnd = option False (True <$ hidden eof)Return the current input. input continues parsing with input. megaparsec2Return the current source position. This function  is not cheap, do not call it e.g. on matching of every token, that's a bad idea. Still you can use it to get $ to attach to things that you parse.The function works under the assumption that we move in the input stream only forwards and never backwards, which is always true unless the user abuses the library. megaparsec*Get the number of tokens processed so far. See also: . megaparsec*Set the number of tokens processed so far. See also: . st sets the parser state to st. See also: , . Parser to runName of source fileInput for parser Parser to runInput for parser Parser to runName of source fileInput for parser Parser to run Initial state Parser to runName of source fileInput for parser Parser to run Initial stateUnexpected item (if any)Expected itemsFancy error componentsHow to process &s+The @region@ that the processing applies toUnexpected item (if any)Expected itemsFancy error componentsToken to matchPredicate to applyToken we should not matchCollection of matching tokens'Collection of taken we should not matchChunk to match  }~&|{wxzytvu'(-),+*./3201FGHIJKLMNSRQTUVOPMN@ABCDE./3210'(-,+*),-& 2018@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe'A synonym for . The same as , but case-insensitive. On success returns string cased as the parsed input.%parseTest (string' "foobar") "foObAr""foObAr".& 2018@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafeI sc lineComment blockComment produces a parser that can parse white space in general. It's expected that you create such a parser once and pass it to other functions in this module as needed (when you see  spaceConsumer9 in documentation, usually it means that something like  is expected there).sc; is used to parse blocks of space characters. You can use  / from Text.Megaparsec.Char for this purpose as well as your own parser (if you don't want to automatically consume newlines, for example). Make sure that the parser does not succeed on the empty input though. In an earlier version of the library  0, was recommended, but now parsers based on & are preferred because of their speed. lineComment. is used to parse line comments. You can use skipLineComment$ if you don't need anything special. blockComment< is used to parse block (multi-line) comments. You can use skipBlockComment or skipBlockCommentNested% if you don't need anything special.:If you don't want to allow a kind of comment, simply pass  which will fail instantly when parsing of that sort of comment is attempted and  will just move on or finish depending on whether there is more white space for it to consume.This is a wrapper for lexemes. The typical usage is to supply the first argument (parser that consumes white space, probably defined via ) and use the resulting function to wrap parsers for every lexeme. ;lexeme = L.lexeme spaceConsumer integer = lexeme L.decimalThis is a helper to parse symbols, i.e. verbatim strings. You pass the first argument (parser that consumes white space, probably defined via ?) and then you can use the resulting function to parse strings: symbol = L.symbol spaceConsumer parens = between (symbol "(") (symbol ")") braces = between (symbol "{") (symbol "}") angles = between (symbol "<") (symbol ">") brackets = between (symbol "[") (symbol "]") semicolon = symbol ";" comma = symbol "," colon = symbol ":" dot = symbol "."A case-insensitive version of . This may be helpful if you're working with case-insensitive languages.A parser for space characters which does not accept empty input (e.g.  /)"A parser for a line comment (e.g. skipLineComment)#A parser for a block comment (e.g. skipBlockComment)'How to consume white space after lexemeHow to parse actual lexeme'How to consume white space after lexemeSymbol to parse'How to consume white space after lexeme"Symbol to parse (case-insensitive)  2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimental non-portableSafe YParse a newline character.Parse a carriage return character followed by a newline character. Return the sequence of characters parsed.Parse a CRLF (see  ) or LF (see 9) end of line. Return the sequence of characters parsed.Parse a tab character.Skip zero or more white space characters. See also:  and . megaparsec Like 4, but does not accept newlines and carriage returns. megaparsecSkip one or more white space characters. See also:  and . megaparsec Like 4, but does not accept newlines and carriage returns.Parse a control character (a non-printing character of the Latin-1 subset of Unicode).Parse a Unicode space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab.Parse an upper-case or title-case alphabetic Unicode character. Title case is used by a small number of letter ligatures like the single-character form of Lj.0Parse a lower-case alphabetic Unicode character.Parse an alphabetic Unicode character: lower-case, upper-case, or title-case letter, or a letter of case-less scripts/modifier letter.8Parse an alphabetic or numeric digit Unicode characters.Note that the numeric digits outside the ASCII range are parsed by this parser but not by . Such digits may be part of identifiers but are not used by the printer and reader to represent numbers.Parse a printable Unicode character: letter, number, mark, punctuation, symbol or space..Parse an ASCII digit, i.e between @0@ and @9@. megaparsec&Parse a binary digit, i.e. "0" or "1"./Parse an octal digit, i.e. between @0@ and @7@.Parse a hexadecimal digit, i.e. between @0@ and @9@, or @a@ and @f@, or @A@ and @F@.Parse a Unicode mark character (accents and the like), which combines with preceding characters.Parse a Unicode numeric character, including digits from various scripts, Roman numerals, etc.Parse a Unicode punctuation character, including various kinds of connectors, brackets and quotes.Parse a Unicode symbol characters, including mathematical and currency symbols./Parse a Unicode space and separator characters.Parse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set.Parse a character from the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set. cat/ parses character in Unicode General Category cat, see 12.;Return the human-readable name of Unicode General Category.A type-constrained version of . semicolon = char ';' The same as  but case-insensitive. This parser returns the actually parsed character preserving its case.parseTest (char' 'e') "E"'E'parseTest (char' 'e') "G"1:1:unexpected 'G'expecting 'E' or 'e'#Is it a horizontal space character?    2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimental non-portableSafe  megaparsec;Behaviors for parsing of indented tokens. This is used in  , which see./Parse no indented tokens, just return the valueParse many indented tokens (possibly zero), use given indentation level (if , use level of the first indented token); the second argument tells how to get the final result, and the third argument describes how to parse an indented token Just like 9, but requires at least one indented token to be presentGiven a comment prefix this function returns a parser that skips line comments. Note that it stops just before the newline character but doesn't consume the newline. Newline is either supposed to be consumed by  parser or picked up manually. start end/ skips non-nested block comment starting with start and ending with end. megaparsec start end4 skips possibly nested block comment starting with start and ending with end. megaparsec%Return the current indentation level.-The function is a simple shortcut defined as: *indentLevel = sourceColumn <$> getPosition megaparsecFail reporting incorrect indentation error. The error has attached information:9Desired ordering between reference level and actual levelReference indentation levelActual indentation level spaceConsumer ord ref4 first consumes all white space (indentation) with  spaceConsumer parser, then it checks the column position. Ordering between current indentation level and the reference indentation level ref should be ord, otherwise the parser fails. On success the current column position is returned.When you want to parse a block of indentation, first run this parser with arguments like  spaceConsumer   @this will make sure you have some indentation. Use returned value to check indentation on every subsequent line according to syntax of your language. megaparsecParse a non-indented construction. This ensures that there is no indentation before actual data. Useful, for example, as a wrapper for top-level function definitions. megaparsecParse a @reference@ token and a number of other tokens that have a greater (but the same for all of them) level of indentation than that of the @reference@ token. The reference token can influence parsing, see  for more information.Note&: the first argument of this function must6 consume newlines among other white space characters.*Grab indented items. This is a helper for %, it's not a part of the public API. megaparsecCreate a parser that supports line-folding. The first argument is used to consume white space between components of line fold, thus it must consume newlines in order to work properly. The second argument is a callback that receives a custom space-consuming parser as an argument. This parser should be used after separate components of line fold that can be put on different lines.,An example should clarify the usage pattern: sc = L.space (void spaceChar) empty empty myFold = L.lineFold sc $ \sc' -> do L.symbol sc' "foo" L.symbol sc' "bar" L.symbol sc "baz" -- for the last symbol we use normal space consumerThe lexeme parser parses a single literal character without quotes. The purpose of this parser is to help with parsing of conventional escape sequences. It's your responsibility to take care of character literal syntax in your language (by surrounding it with single quotes or similar).The literal character is parsed according to the grammar rules defined in the Haskell report.Note that you can use this parser as a building block to parse various string literals: =stringLiteral = char '"' >> manyTill L.charLiteral (char '"')Performance note:: the parser is not particularly efficient at the moment.Parse an integer in the decimal representation according to the format of integer literals described in the Haskell report..If you need to parse signed integers, see the  combinator.Note: before the version 6.0.0 the function returned 1, i.e. it wasn't polymorphic in its return type.Warning.: this function does not perform range checks..A non-public helper to parse decimal integers. megaparsecParse an integer in binary representation. The binary number is expected to be a non-empty sequence of zeroes @0@ and ones @1@.?You could of course parse some prefix before the actual number: *binary = char '0' >> char' 'b' >> L.binaryWarning.: this function does not perform range checks.Parse an integer in the octal representation. The format of the octal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse @0o@ or @0O@ prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself.For example you can make it conform to the Haskell report like this: (octal = char '0' >> char' 'o' >> L.octalNote: before version 6.0.0 the function returned 1, i.e. it wasn't polymorphic in its return type.Warning.: this function does not perform range checks.Parse an integer in the hexadecimal representation. The format of the hexadecimal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse @0x@ or @0X@ prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself.For example you can make it conform to the Haskell report like this: 4hexadecimal = char '0' >> char' 'x' >> L.hexadecimalNote: before version 6.0.0 the function returned 1, i.e. it wasn't polymorphic in its return type.Warning.: this function does not perform range checks. megaparsec"Parse a floating point value as a  number.  is great for parsing of arbitrary precision numbers coming from an untrusted source. See documentation in Data.Scientific for more information.The parser can be used to parse integers or floating point values. Use functions like 34 from Data.Scientific- to test and extract integer or real values.This function does not parse sign, if you need to parse signed numbers, see .Parse a floating point number according to the syntax for floating point literals described in the Haskell report.This function does not parse sign, if you need to parse signed numbers, see .Note: before version 6.0.0 the function returned 1, i.e. it wasn't polymorphic in its return type.Note: in versions 6.0.0@6.1.1( this function accepted plain integers. space p parses an optional sign character (@+@ or @-@), then if there is a sign it consumes optional white space (using the space# parser), then it runs the parser p which should return a number. Sign of the number is changed according to the previously parsed sign character.3For example, to parse signed integer you can write: lexeme = L.lexeme spaceConsumer integer = lexeme L.decimal signedInteger = L.signed spaceConsumer integer Line comment prefixStart of block commentEnd of block commentStart of block commentEnd of block comment9Desired ordering between reference level and actual levelReference indentation levelActual indentation level(How to consume indentation (white space)9Desired ordering between reference level and actual levelReference indentation level"Current column (indentation level)(How to consume indentation (white space)How to parse actual data(How to consume indentation (white space)How to parse @reference@ tokenReference indentation level"Level of the first indented item (ed)(How to consume indentation (white space)How to parse indented tokens(How to consume indentation (white space)*Callback that uses provided space-consumer)How to consume white space after the signHow to parse the number itselfParser for signed numbers & 2021@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe Data types that can be converted to little- or big- endian numbers.Parse a little-endian number.:You may wish to call this with a visible type application: :number <- anyLE (Just "little-endian 32 bit word") @Word32Parse a big-endian number.:You may wish to call this with a visible type application: 7number <- anyBE (Just "big-endian 32 bit word") @Word32Parse a .Parse a little-endian .Parse a big-endian .Parse a little-endian .Parse a big-endian .Parse a little-endian .Parse a big-endian .Parse a .Parse a little-endian .Parse a big-endian .Parse a little-endian .Parse a big-endian .Parse a little-endian .Parse a big-endian .+Return the number of bytes in the argument.Performs ceiling division, so byte-unaligned types (bitsize not a multiple of 8) should work, but further usage is not tested. Label, if any Label, if any & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafexParse a newline byte.Parse a carriage return character followed by a newline character. Return the sequence of characters parsed.Parse a CRLF (see  ) or LF (see 9) end of line. Return the sequence of characters parsed.Parse a tab character.Skip zero or more white space characters. See also:  and . megaparsec Like 4, but does not accept newlines and carriage returns.Skip one or more white space characters. See also:  and . megaparsec Like 4, but does not accept newlines and carriage returns.Parse a control character.Parse a space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab.Parse an upper-case character.(Parse a lower-case alphabetic character.8Parse an alphabetic character: lower-case or upper-case.(Parse an alphabetic or digit characters.Parse a printable character: letter, number, mark, punctuation, symbol or space..Parse an ASCII digit, i.e between @0@ and @9@. megaparsec&Parse a binary digit, i.e. @0@ or @1@./Parse an octal digit, i.e. between @0@ and @7@.Parse a hexadecimal digit, i.e. between @0@ and @9@, or @a@ and @f@, or @A@ and @F@.Parse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set.A type-constrained version of . newline = char 10 The same as  but case-insensitive. This parser returns the actually parsed character preserving its case.parseTest (char' 101) "E" 69 -- 'E'parseTest (char' 101) "G"1:1:unexpected 'G'expecting 'E' or 'e'-specialized version of 15.Like 4, but does not accept newlines and carriage returns.Convert a byte to char.)Convert a byte to its upper-case version.)Convert a byte to its lower-case version.& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe  Given a comment prefix this function returns a parser that skips line comments. Note that it stops just before the newline character but doesn't consume the newline. Newline is either supposed to be consumed by  parser or picked up manually. start end/ skips non-nested block comment starting with start and ending with end. megaparsec start end4 skips possibly nested block comment starting with start and ending with end.Parse an integer in the decimal representation according to the format of integer literals described in the Haskell report..If you need to parse signed integers, see the  combinator.Warning.: this function does not perform range checks..A non-public helper to parse decimal integers. megaparsecParse an integer in the binary representation. The binary number is expected to be a non-empty sequence of zeroes @0@ and ones @1@.?You could of course parse some prefix before the actual number: (binary = char 48 >> char' 98 >> L.binaryWarning.: this function does not perform range checks.Parse an integer in the octal representation. The format of the octal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse @0o@ or @0O@ prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself.For example you can make it conform to the Haskell report like this: 'octal = char 48 >> char' 111 >> L.octalWarning.: this function does not perform range checks.Parse an integer in the hexadecimal representation. The format of the hexadecimal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse @0x@ or @0X@ prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself.For example you can make it conform to the Haskell report like this: 3hexadecimal = char 48 >> char' 120 >> L.hexadecimalWarning.: this function does not perform range checks."Parse a floating point value as a  number.  is great for parsing of arbitrary precision numbers coming from an untrusted source. See documentation in Data.Scientific for more information.The parser can be used to parse integers or floating point values. Use functions like 34 from Data.Scientific- to test and extract integer or real values.This function does not parse sign, if you need to parse signed numbers, see .Parse a floating point number according to the syntax for floating point literals described in the Haskell report.This function does not parse sign, if you need to parse signed numbers, see .Note: in versions 6.0.0@6.1.1' this function accepted plain integers. space p parser parses an optional sign character (@+@ or @-@), then if there is a sign it consumes optional white space (using space parser), then it runs parser p which should return a number. Sign of the number is changed according to the previously parsed sign character.3For example, to parse signed integer you can write: lexeme = L.lexeme spaceConsumer integer = lexeme L.decimal signedInteger = L.signed spaceConsumer integer'A fast predicate to check if the given  is a digit in ASCII.Line comment prefixStart of block commentEnd of block commentStart of block commentEnd of block comment)How to consume white space after the signHow to parse the number itselfParser for signed numbers66676869::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[[\[][^[_[`aaabacadaefghijklmnopqrstuvwxxxyzzz{|}~~)              *#$-"-%....       /   0                   +                                                  /   0           +         &&&&&'&&&&&&&&&&&&(&&!   3  5    'megaparsec-9.7.0-7nUVNA2TGfDDUZ1BhuzZSkText.Megaparsec.PosText.Megaparsec.UnicodeText.Megaparsec.ErrorText.Megaparsec.StateText.Megaparsec.StreamText.Megaparsec.Error.BuilderText.Megaparsec.InternalText.MegaparsecText.Megaparsec.DebugText.Megaparsec.CharText.Megaparsec.Char.LexerText.Megaparsec.Byte.BinaryText.Megaparsec.ByteText.Megaparsec.Byte.Lexer megaparsecTTextTLB ByteStringBLcopysplitsplitAt $dmchunkEmpty$dmreachOffset$dmreachOffsetNoLine$dmtokenToChunk$dmtokensLength$dmerrorComponentLenText.Megaparsec.ClassA<|>stringsatisfychunkstring'Control.Monad.Combinatorsmanysome $dmhidden customFailurechar0Text.Megaparsec.CommonText.Megaparsec.Lexerspace1 spaceChar Data.CharGeneralCategoryData.ScientificfloatingOrIntegerisSpace SourcePos sourceColumn sourceLine sourceNameInvalidPosExceptionPosmkPosunPospos1defaultTabWidth initialPossourcePosPretty $fReadPos$fSemigroupPos$fNFDataInvalidPosException$fExceptionInvalidPosException$fNFDataSourcePos$fShowSourcePos$fReadSourcePos $fEqSourcePos$fOrdSourcePos$fDataSourcePos$fGenericSourcePos$fEqInvalidPosException$fShowInvalidPosException$fDataInvalidPosException$fGenericInvalidPosException $fShowPos$fEqPos$fOrdPos $fDataPos $fGenericPos $fNFDataPos stringLength charLength isWideChar ParseErrorPosStatepstateLinePrefixpstateTabWidthpstateSourcePos pstateOffset pstateInputStatestateParseErrors statePosState stateOffset stateInput initialStateinitialPosState$fNFDataPosState $fNFDataState$fGenericState$fShowPosState $fEqPosState$fDataPosState$fGenericPosState $fDataState $fEqState $fShowStateTraversableStream reachOffsetreachOffsetNoLine VisualStream showTokens tokensLength NoShareInputunNoShareInput ShareInput unShareInputStreamTokenTokens tokenToChunk tokensToChunk chunkToTokens chunkLength chunkEmptytake1_takeN_ takeWhile_ $fStreamSeq $fStreamList $fStreamText $fStreamText0$fStreamByteString$fStreamByteString0$fStreamShareInput$fStreamShareInput0$fStreamShareInput1$fStreamShareInput2$fStreamNoShareInput$fStreamNoShareInput0$fStreamNoShareInput1$fStreamNoShareInput2$fVisualStreamText$fVisualStreamText0$fVisualStreamByteString$fVisualStreamByteString0$fVisualStreamList$fTraversableStreamText$fTraversableStreamText0$fTraversableStreamByteString$fTraversableStreamByteString0$fTraversableStreamListShowErrorComponentshowErrorComponenterrorComponentLenParseErrorBundlebundlePosState bundleErrors TrivialError FancyError ErrorFancy ErrorFailErrorIndentation ErrorCustom ErrorItemLabel EndOfInput mapParseError errorOffsetsetErrorOffsetattachSourcePoserrorBundlePrettyWitherrorBundlePretty$errorBundlePrettyForGhcPreProcessorsparseErrorPrettyparseErrorTextPretty showErrorItem$fNFDataErrorItem$fNFDataErrorFancy$fMonoidParseError$fSemigroupParseError$fNFDataParseError$fNFDataParseErrorBundle$fShowErrorComponentVoid$fExceptionParseErrorBundle$fExceptionParseError$fGenericParseErrorBundle$fGenericParseError$fShowErrorFancy$fReadErrorFancy$fEqErrorFancy$fOrdErrorFancy$fDataErrorFancy$fGenericErrorFancy$fFunctorErrorFancy$fShowErrorItem$fReadErrorItem $fEqErrorItem$fOrdErrorItem$fDataErrorItem$fGenericErrorItem$fFunctorErrorItem$fDataParseErrorBundle$fEqParseErrorBundle$fShowParseErrorBundle$fDataParseError$fEqParseError$fShowParseErrorEFETerrerrFancyutokutoksulabelueofetoketokselabeleeoffancy $fMonoidET $fSemigroupET $fMonoidEF $fSemigroupEF$fEqEF$fOrdEF$fDataEF $fGenericEF $fGenericET$fDataET$fOrdET$fEqETReply MonadParsec parseErrorlabelhiddentry lookAhead notFollowedBy withRecovery observingeoftokentokens takeWhileP takeWhile1PtakePgetParserStateupdateParserStatemkParsecParsecTunParserResultOKError ConsumptionConsumed NotConsumedHintstoHints withHintsaccHints refreshHints runParsecT withParsecT $fMonoidHints$fSemigroupHints$fMonadParsecesParsecT$fMonadTransParsecT$fMonadFixParsecT$fMonadPlusParsecT$fMonadErrore'ParsecT$fMonadContParsecT$fMonadWriterwParsecT$fMonadStatestParsecT$fMonadReaderrParsecT$fMonadIOParsecT$fMonadFailParsecT$fMonadParsecT$fAlternativeParsecT$fApplicativeParsecT$fFunctorParsecT$fIsStringParsecT$fMonoidParsecT$fSemigroupParsecT$fFunctorReply$fFunctorResultMonadParsecDbgdbgdbg'$fMonadParsecDbgesIdentityT$fMonadParsecDbgesWriterT$fMonadParsecDbgesWriterT0$fMonadParsecDbgesReaderT$fMonadParsecDbgesStateT$fMonadParsecDbgesStateT0$fShowShowComment$fMonadParsecDbgesRWST$fMonadParsecDbgesRWST0$fMonadParsecDbgesParsecT $fShowBlindParsecparse parseMaybe parseTest runParser runParser' runParserT runParserT'failure fancyFailure unexpectedregionregisterParseErrorregisterFailureregisterFancyFailuresingle anySingle anySingleButoneOfnoneOfmatchtakeRestatEndgetInputsetInput getSourcePos getOffset setOffsetsetParserStatespacelexemesymbolsymbol'newlinecrlfeoltabhspacehspace1 controlChar upperChar lowerChar letterChar alphaNumChar printChar digitChar binDigitChar octDigitChar hexDigitCharmarkChar numberCharpunctuationChar symbolChar separatorChar asciiChar latin1Char charCategory categoryNamechar' IndentOpt IndentNone IndentMany IndentSomeskipLineCommentskipBlockCommentskipBlockCommentNested indentLevelincorrectIndent indentGuard nonIndented indentBlocklineFold charLiteraldecimalbinaryoctal hexadecimal scientificfloatsigned BinaryChunkconvertChunkBEconvertChunkLEanyLEanyBEword8word16leword16beword32leword32beword64leword64beint8int16leint16beint32leint32beint64leint64be$fBinaryChunkByteString$fBinaryChunkByteString0 ghc-internalGHC.Internal.Base Semigroupghc-prim GHC.TypesIntCharwideCharRangesStStringGHC.Internal.MaybeMaybeNothingJustTruetlCopy reachOffset'reachOffsetNoLine' splitAtBL splitAtTL stringPretty charPretty charPretty' expandTabcharIncbyteIncGHC.Internal.WordWord8MonoidVoidGHC.Internal.Control.Monad.Failfailfmap GHC.ClassesOrd mergeErrorGHC.Internal.Data.Traversable TraversableerrorItemLengthshowErrorFancyerrorFancyLengthmessageItemsPrettyorListcanonicalizeTokensunexpexpenesGHC.Internal.Data.EitherLeftRight$fMonadParsecesRWST$fMonadParsecesRWST0 longestMatchmzeroreturnemptypureBlindGHC.Internal.ShowShowDbgItemdbgLog ShowCommentGHC.Internal.Debug.TracetracedbgWithComment showStream streamDelta streamTake"GHC.Internal.Data.Functor.IdentityIdentitybaseControl.Applicativeoptional/parser-combinators-1.3.0-9dGlNGrxRKm7bswc127iUwControl.Applicative.CombinatorsbetweenchoiceeitherPoptioncountcount'endByendBy1manyTill manyTill_sepBysepBy1sepEndBy sepEndBy1 skipCountskipMany skipManyTillskipSome skipSomeTillsomeTill someTill_isHSpaceGT indentedItems ghc-bignumGHC.Num.IntegerIntegerdecimal_)scientific-0.3.8.0-6dfjATK7mI56mLkckldZpR ScientificDoubleWord16Word32Word64GHC.Internal.IntInt8Int16Int32Int64finiteByteSizetoChartoUppertoLowerisDigit