h&3      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                              & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe6;= w  megaparsecThe 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. megaparsecName of source file megaparsec Line number megaparsec Column number megaparsecThe exception is thrown by  - when its argument is not a positive number. megaparsec-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  megaparsecConstruct initial position (line 1, column 1) given name of source file. megaparsecPretty-print a .   & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&% megaparsec5An internal helper state type combining a difference  and an unboxed .1  megaparsecType class for inputs that can also be used for error reporting.2 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.3 megaparsec A version of 2 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.4  megaparsec:Type class for inputs that can also be used for debugging.5 megaparsecPretty-print non-empty stream of tokens. This function is also used to print single tokens (represented as singleton lists).6 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.7 megaparsec:Type class for inputs that can be consumed by the library.Note: before the version 9.0.0& the class included the methods from 4 and 1.8 megaparsecType of token in the stream.9 megaparsecType of @chunk@ of the stream.: megaparsecLift 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.; megaparsecThe first method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: .chunkToTokens pxy (tokensToChunk pxy ts) == ts< megaparsecThe second method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: 4tokensToChunk pxy (chunkToTokens pxy chunk) == chunk= megaparsec'Return length of a chunk of the stream.> megaparsecCheck if a chunk of the stream is empty. The default implementation is in terms of the more general =: +chunkEmpty pxy ts = chunkLength pxy ts <= 0However for many streams there may be a more efficient implementation.? megaparsec/Extract a single token form the stream. Return  if the stream is empty.@ megaparsec@ 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.A megaparsecExtract 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. megaparsec+A helper definition to facilitate defining 2 for various stream types. megaparsecLike  but for 3. megaparsecLike  but accepts the index as an . megaparsecLike  but accepts the index as an . megaparsecstringPretty s) returns pretty representation of string s>. This is used when printing string tokens in error messages. megaparsec charPretty ch returns user-friendly string representation of given character ch', suitable for using in error messages. megaparsecIf the given character has a pretty representation, return that, otherwise . This is an internal helper. megaparsec3Replace tab characters with given number of spaces.F  megaparsecG  megaparsec2 megaparsecOffset to reach megaparsecInitial $ to use megaparsec#See the description of the function3 megaparsecOffset to reach megaparsecInitial $ to use megaparsec)Reached source position and updated state megaparsec)How to split input stream at given offset megaparsecHow to fold over input stream megaparsec,How to convert chunk of input stream into a  megaparsecHow to convert a token into a  megaparsecNewline token and tab token megaparsecOffset to reach megaparsecInitial $ to use megaparsecLine at which  is located, updated $ megaparsec)How to split input stream at given offset megaparsecHow to fold over input stream megaparsecNewline token and tab token megaparsecOffset to reach megaparsecInitial $ to use megaparsecUpdated $123456789:;<=>?@A789:;<=>?@A456123  2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe56;* $ megaparsecA special kind of state that is used to calculate line/column positions on demand.& megaparsecThe rest of input to process' megaparsec%Offset corresponding to beginning of &( megaparsec.Source position corresponding to beginning of &) megaparsec'Tab width to use for column calculation* megaparsec#Prefix to prepend to offending line+ megaparsec=This is the Megaparsec's state parametrized over stream type s" and custom error component type e.- megaparsecThe rest of input to process. megaparsec!Number of processed tokens so far/ megaparsec.State that is used for line/column calculation0 megaparsecCollection of @delayed@ s in reverse order. This means that the last registered error is the first element of the list. $%&'()*+,-./0& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&568;< 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.R megaparsec:The type class defines how to print a custom component of .S megaparsecPretty-print a component of .T megaparsecLength of the error component in characters, used for highlighting of parse errors in input string.U megaparsecA non-empty collection of s equipped with $ that allows us to pretty-print the errors efficiently and correctly.W megaparsecA collection of 's that is sorted by parse error offsetsX megaparsec2The state that is used for line/column calculationY megaparsecTrivial 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.Z megaparsecFancy, 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.\ megaparsec has been used in parser monad] megaparsecIncorrect indentation error: desired ordering between reference level and actual level, reference indentation level, actual indentation level^ megaparsecCustom error data_ megaparsecA data type that is used to represent @unexpected/expected@ items in ). It is parametrized over the token type t.` megaparsecNon-empty stream of tokensa megaparsecLabel (cannot be empty)b megaparsec End of inputc megaparsecModify the custom data component in a parse error. This could be done via  if not for the  constraint.d megaparsecGet the offset of a .e megaparsecSet the offset of a . megaparsecMerge 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.f 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.g megaparsecPretty-print a U. 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.h megaparsecPretty-print a . The rendered  always ends with a newline.i megaparsec!Pretty-print a textual part of a =, that is, everything except for its position. The rendered  always ends with a newline. megaparsecPretty-print an _. megaparsec5Get length of the @pointer@ to display under a given _. megaparsecPretty-print an [. megaparsec5Get length of the @pointer@ to display under a given [. megaparsecTransform a list of error messages into their textual representation. megaparsecPrint a pretty list where items are separated with commas and the word @or@ according to the rules of English punctuation.f megaparsec)How to project offset from an item (e.g. d) megaparsecThe collection of items megaparsecInitial $ megaparsecThe collection with es added and the final $g megaparsecParse error bundle to display megaparsecTextual rendition of the bundleh megaparsecParse error to render megaparsecResult of renderingi megaparsecParse error to render megaparsecResult of rendering megaparsecPrefix to prepend megaparsecCollection of messages megaparsecResult of renderingYZRSTUVWX[\]^_`abcdefghi_`ab[\]^YZcdeUVWXfRSTghi& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe56;C[ megaparsec6Auxiliary type for construction of fancy parse errors. megaparsec8Auxiliary type for construction of trivial parse errors. megaparsec 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. megaparsecLike , but constructs a @fancy@ . megaparsec0Construct an @unexpected token@ error component. megaparsecConstruct an @unexpected tokens@ error component. Empty chunk produces b. megaparsecConstruct an @unexpected label@ error component. Do not use with empty strings (for empty strings it's bottom). megaparsec7Construct an @unexpected end of input@ error component. megaparsec.Construct an @expected token@ error component. megaparsecConstruct an @expected tokens@ error component. Empty chunk produces b. megaparsecConstruct an @expected label@ error component. Do not use with empty strings. megaparsec5Construct an @expected end of input@ error component. megaparsec#Construct a custom error component. megaparsecConstruct the appropriate _ representation for the given token stream. The empty string produces b. megaparsecLift an unexpected item into . megaparsecLift an expected item into . megaparsec-Make a singleton non-empty list from a value. megaparsec offset megaparsecError components megaparsec Resulting  megaparsec offset megaparsecError components megaparsec Resulting    2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafecq megaparsecType 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. megaparsec 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. megaparsec 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. megaparsec 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. megaparsecIf 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. megaparsec 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. megaparsec.This parser only succeeds at the end of input. megaparsec 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. megaparsec 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 . megaparsec"Return the full parser state as a + record. megaparsec f applies the function f to the parser state. megaparsec megaparsec megaparsecHow to recover from failure megaparsecOriginal parser megaparsec%Parser that can recover from failures megaparsecThe parser to run megaparsec(Matching function for the token to parse megaparsecUsed in the error message to mention the items that were expected megaparsec%Predicate to check equality of chunks megaparsecChunk of input to match against megaparsec"Name for a single token in the row megaparsecPredicate to use to test tokens megaparsecA chunk of matching tokens megaparsec"Name for a single token in the row megaparsecPredicate to use to test tokens megaparsecA chunk of matching tokens megaparsec"Name for a single token in the row megaparsecHow many tokens to extract megaparsecA chunk of matching tokens 2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafes megaparsec e s m a2 is a parser with custom data component of error e, stream type s, underlying monad m and return type a. megaparsecWhether the parser has failed or not. On success we include the resulting value, on failure we include a . See also: , . megaparsecParser succeeded megaparsec Parser failed megaparsec+Whether the input has been consumed or not. See also: , . megaparsec&Some part of input stream was consumed megaparsecNo input was consumed megaparsecAll 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. See also: , . megaparsec represent a collection of _s to be included into  (when it's a Y) 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 input megaparsecFrom two states, return the one with the greater number of processed tokens. If the numbers of processed tokens are equal, prefer the second state. megaparsec Convert a  record into . megaparsec 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. megaparsec hs c9 results in @OK@ continuation that will add given hints hs, to third argument of original continuation c. megaparsecReplace the most recent group of hints (if any) with the given _ (or delete it if ! is given). This is used in the  primitive. megaparsecLow-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 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 = meroHowever the following holds: try v >> mzero = mzero megaparsec returns a parser that succeeds without consuming input. megaparsec is a parser that fails without consuming input. megaparsec returns a parser that succeeds without consuming input. megaparsec megaparsec megaparsec megaparsecCurrent offset in input stream megaparsecParse error to convert megaparsec Hints to use megaparsecContinuation to influence megaparsec(First argument of resulting continuation megaparsec)Second argument of resulting continuation megaparsec to add megaparsecAn @OK@ continuation to alter megaparsecAltered @OK@ continuation megaparsec Parser to run megaparsec Initial state megaparsec Inner parser megaparsec Outer parser& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableUnsafe~ megaparsec+A single piece of info to be rendered with . megaparsecA wrapper type with a dummy  instance. megaparsec 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.Finally, it's not possible to lift this function into some monad transformers without introducing surprising behavior (e.g. unexpected state backtracking) or adding otherwise redundant constraints (e.g. < instance for state), so this helper is only available for  monad, not any instance of  in general.  megaparsec Just like <, but doesn't require the return value of the parser to be -able. megaparsec(Render a single piece of debugging info. megaparsecPretty-print a list of tokens. megaparsec*Calculate number of consumed tokens given +% of parser before and after parsing. megaparsec1Extract a given number of tokens from the stream. megaparsecDebugging label megaparsecParser to debug megaparsec%Parser that prints debugging messages megaparsecDebugging label megaparsecParser to debug megaparsec%Parser that prints debugging messages megaparsecDebugging label megaparsecInformation to render megaparsecRendered result megaparsec"State of parser before consumption megaparsec!State of parser after consumption megaparsecNumber of consumed tokens 2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe y" megaparsec2 is a non-transformer variant of the more general  monad transformer. megaparsec 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 U () or a value of type a (). g can be used to turn U; 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 ',' megaparsec 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. megaparsecThe expression  p input applies the parser p on the input input5 and prints the result to stdout. Useful for testing. megaparsec 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 U () or a value of type a (). 9parseFromFile p file = runParser p file <$> readFile file 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. megaparsec 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 U () 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. megaparsecGiven the name of source file and the input construct the initial state for a parser. megaparsec"Stop parsing and report a trivial . megaparsec Stop parsing and report a fancy .. To report a single custom parse error, see . megaparsec 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 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: , ,  . megaparsecA 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 . 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) megaparsecReturn the current input. megaparsec 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: . megaparsec st sets the parser state to st. See also: , . megaparsec Parser to run megaparsecName of source file megaparsecInput for parser megaparsec Parser to run megaparsecInput for parser megaparsec Parser to run megaparsecName of source file megaparsecInput for parser megaparsec Parser to run megaparsec Initial state megaparsec Parser to run megaparsecName of source file megaparsecInput for parser megaparsec Parser to run megaparsec Initial state megaparsecUnexpected item (if any) megaparsecExpected items megaparsecFancy error components megaparsecHow to process s megaparsec+The @region@ that the processing applies to megaparsecUnexpected item (if any) megaparsecExpected items megaparsecFancy error components megaparsecToken to match megaparsecPredicate to apply megaparsecToken we should not match megaparsecCollection of matching tokens megaparsec'Collection of taken we should not match megaparsecChunk to matchYZ $%&'()*+,-./01234567A@?>=<;:8989RSTUXVW[^\]_b`acdefghi+,-./0$%&'()*0& 2018@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe1 megaparsecA synonym for . megaparsec 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  experimentalportableSafe megaparsec 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 , 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. megaparsecThis 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.decimal megaparsecThis 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 "." megaparsecA case-insensitive version of . This may be helpful if you're working with case-insensitive languages. megaparsecA parser for space characters which does not accept empty input (e.g. ) megaparsec"A parser for a line comment (e.g. skipLineComment) megaparsec#A parser for a block comment (e.g. skipBlockComment) megaparsec'How to consume white space after lexeme megaparsecHow to parse actual lexeme megaparsec'How to consume white space after lexeme megaparsecSymbol to parse megaparsec'How to consume white space after lexeme megaparsec"Symbol to parse (case-insensitive) 2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimental non-portableSafe @ megaparsecParse a newline character. megaparsecParse a carriage return character followed by a newline character. Return the sequence of characters parsed. megaparsecParse a CRLF (see  ) or LF (see 9) end of line. Return the sequence of characters parsed. megaparsecParse a tab character. megaparsecSkip zero or more white space characters. See also:  and .  megaparsecLike 4, but does not accept newlines and carriage returns. megaparsecSkip one or more white space characters. See also:  and .  megaparsecLike 4, but does not accept newlines and carriage returns. megaparsecParse a control character (a non-printing character of the Latin-1 subset of Unicode). megaparsecParse a Unicode space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab. megaparsecParse 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. megaparsec0Parse a lower-case alphabetic Unicode character. megaparsecParse an alphabetic Unicode character: lower-case, upper-case, or title-case letter, or a letter of case-less scripts/modifier letter. megaparsec8Parse 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. megaparsecParse a printable Unicode character: letter, number, mark, punctuation, symbol or space. megaparsec.Parse an ASCII digit, i.e between @0@ and @9@. megaparsec&Parse a binary digit, i.e. "0" or "1". megaparsec/Parse an octal digit, i.e. between @0@ and @7@. megaparsecParse a hexadecimal digit, i.e. between @0@ and @9@, or @a@ and @f@, or @A@ and @F@. megaparsecParse a Unicode mark character (accents and the like), which combines with preceding characters. megaparsecParse a Unicode numeric character, including digits from various scripts, Roman numerals, etc. megaparsecParse a Unicode punctuation character, including various kinds of connectors, brackets and quotes. megaparsecParse a Unicode symbol characters, including mathematical and currency symbols. megaparsec/Parse a Unicode space and separator characters. megaparsecParse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set. megaparsecParse a character from the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set. megaparsec cat/ parses character in Unicode General Category cat, see . megaparsec;Return the human-readable name of Unicode General Category. megaparsecA type-constrained version of . semicolon = char ';' megaparsec 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' megaparsec#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. megaparsec/Parse no indented tokens, just return the value megaparsecParse 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 megaparsec Just like 9, but requires at least one indented token to be present megaparsecGiven 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. megaparsec 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 megaparsec 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.Tokens must not consume newlines after them. On the other hand, the first argument of this function must6 consume newlines among other white space characters. megaparsec*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 consumer megaparsecThe 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. megaparsecParse 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. megaparsec.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. megaparsecParse 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. megaparsecParse 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  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 . megaparsecParse 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. megaparsec 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  megaparsecLine comment prefix megaparsecStart of block comment megaparsecEnd of block comment megaparsecStart of block comment megaparsecEnd of block comment megaparsec9Desired ordering between reference level and actual level megaparsecReference indentation level megaparsecActual indentation level megaparsec(How to consume indentation (white space) megaparsec9Desired ordering between reference level and actual level megaparsecReference indentation level megaparsec"Current column (indentation level) megaparsec(How to consume indentation (white space) megaparsecHow to parse actual data megaparsec(How to consume indentation (white space) megaparsecHow to parse @reference@ token megaparsecReference indentation level megaparsec"Level of the first indented item (ed) megaparsec(How to consume indentation (white space) megaparsecHow to parse indented tokens megaparsec(How to consume indentation (white space) megaparsec*Callback that uses provided space-consumer megaparsec)How to consume white space after the sign megaparsecHow to parse the number itself megaparsecParser for signed numbers & 2021@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe  megaparsecData types that can be converted to little- or big- endian numbers. megaparsecParse a little-endian number.:You may wish to call this with a visible type application: :number <- anyLE (Just "little-endian 32 bit word") @Word32 megaparsecParse a big-endian number.:You may wish to call this with a visible type application: 7number <- anyBE (Just "big-endian 32 bit word") @Word32 megaparsecParse a . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsecParse a . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsecParse a little-endian . megaparsecParse a big-endian . megaparsec+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. megaparsec Label, if any megaparsec Label, if any & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe megaparsecParse a newline byte. megaparsecParse a carriage return character followed by a newline character. Return the sequence of characters parsed. megaparsecParse a CRLF (see  ) or LF (see 9) end of line. Return the sequence of characters parsed. megaparsecParse a tab character. megaparsecSkip zero or more white space characters. See also:  and .  megaparsecLike 4, but does not accept newlines and carriage returns. megaparsecSkip one or more white space characters. See also:  and .  megaparsecLike 4, but does not accept newlines and carriage returns. megaparsecParse a control character. megaparsecParse a space character, and the control characters: tab, newline, carriage return, form feed, and vertical tab. megaparsecParse an upper-case character. megaparsec(Parse a lower-case alphabetic character. megaparsec8Parse an alphabetic character: lower-case or upper-case. megaparsec(Parse an alphabetic or digit characters. megaparsecParse a printable character: letter, number, mark, punctuation, symbol or space. megaparsec.Parse an ASCII digit, i.e between @0@ and @9@. megaparsec&Parse a binary digit, i.e. @0@ or @1@. megaparsec/Parse an octal digit, i.e. between @0@ and @7@. megaparsecParse a hexadecimal digit, i.e. between @0@ and @9@, or @a@ and @f@, or @A@ and @F@. megaparsecParse a character from the first 128 characters of the Unicode character set, corresponding to the ASCII character set. megaparsecA type-constrained version of . newline = char 10 megaparsec 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' megaparsec-specialized version of  !. megaparsecLike 4, but does not accept newlines and carriage returns. megaparsecConvert a byte to char. megaparsec)Convert a byte to its upper-case version. megaparsec)Convert a byte to its lower-case version. & 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe  megaparsecGiven 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. megaparsec 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. megaparsecParse 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. megaparsec.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. megaparsecParse 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. megaparsecParse 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. 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  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 . megaparsecParse 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. megaparsec 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 megaparsec'A fast predicate to check if the given  is a digit in ASCII. megaparsecLine comment prefix megaparsecStart of block comment megaparsecEnd of block comment megaparsecStart of block comment megaparsecEnd of block comment megaparsec)How to consume white space after the sign megaparsecHow to parse the number itself megaparsecParser for signed numbers"##$%&''()*+,-./0123456789:;<=>?@ABC D D E F G H I J J K L M NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsstuvwxyz{|W}~                                                                              !      'megaparsec-9.2.2-Bh5JbmGMk2pDR4NazpOEEQText.Megaparsec.ErrorText.Megaparsec.PosText.MegaparsecText.Megaparsec.StreamText.Megaparsec.Error.BuilderText.Megaparsec.InternalText.Megaparsec.DebugText.Megaparsec.CharText.Megaparsec.Char.LexerText.Megaparsec.Byte.BinaryText.Megaparsec.ByteText.Megaparsec.Byte.LexerText.Megaparsec.StateText.Megaparsec.ClassA<|>stringsatisfychunkstring'Control.Monad.Combinatorsmanysome MonadParseccharText.Megaparsec.CommonText.Megaparsec.Lexerspace1 spaceCharData.ScientificfloatingOrInteger Data.CharisSpace ParseError SourcePos sourceName sourceLine sourceColumnInvalidPosExceptionPosmkPosunPospos1defaultTabWidth initialPossourcePosPretty $fReadPos$fSemigroupPos$fNFDataInvalidPosException$fExceptionInvalidPosException$fNFDataSourcePos$fShowSourcePos$fReadSourcePos $fEqSourcePos$fOrdSourcePos$fDataSourcePos$fGenericSourcePos$fEqInvalidPosException$fShowInvalidPosException$fDataInvalidPosException$fGenericInvalidPosException $fShowPos$fEqPos$fOrdPos $fDataPos $fGenericPos $fNFDataPosPosState pstateInput pstateOffsetpstateSourcePospstateTabWidthpstateLinePrefixState stateInput stateOffset statePosStatestateParseErrorsTraversableStream reachOffsetreachOffsetNoLine VisualStream showTokens tokensLengthStreamTokenTokens tokenToChunk tokensToChunk chunkToTokens chunkLength chunkEmptytake1_takeN_ takeWhile_ $fStreamText $fStreamText0$fStreamByteString$fStreamByteString0 $fStreamSeq $fStream[]$fVisualStreamText$fVisualStreamText0$fVisualStreamByteString$fVisualStreamByteString0$fVisualStream[]$fTraversableStreamText$fTraversableStreamText0$fTraversableStreamByteString$fTraversableStreamByteString0$fTraversableStream[]ShowErrorComponentshowErrorComponenterrorComponentLenParseErrorBundle bundleErrorsbundlePosState TrivialError FancyError ErrorFancy ErrorFailErrorIndentation ErrorCustom ErrorItemLabel EndOfInput mapParseError errorOffsetsetErrorOffsetattachSourcePoserrorBundlePrettyparseErrorPrettyparseErrorTextPretty$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$fEqET parseErrorlabelhiddentry lookAhead notFollowedBy withRecovery observingeoftokentokens takeWhileP takeWhile1PtakePgetParserStateupdateParserStateParsecTunParserResultOKError ConsumptionConsumedVirginReplyHintstoHints withHintsaccHintsrefreshLastHint runParsecT withParsecT $fMonoidHints$fSemigroupHints$fMonadParsecesParsecT$fMonadTransParsecT$fMonadFixParsecT$fMonadPlusParsecT$fMonadErrore'ParsecT$fMonadContParsecT$fMonadStatestParsecT$fMonadReaderrParsecT$fMonadIOParsecT$fMonadFailParsecT$fMonadParsecT$fAlternativeParsecT$fApplicativeParsecT$fFunctorParsecT$fIsStringParsecT$fMonoidParsecT$fSemigroupParsecTdbgdbg' $fShowBlindParsecparse parseMaybe parseTest runParser runParser' runParserT runParserT'failure fancyFailure unexpected customFailureregionregisterParseErrorregisterFailureregisterFancyFailuresingle 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$fBinaryChunkByteString0baseGHC.Base Semigroupghc-prim GHC.TypesIntStString GHC.MaybeMaybeNothingJustTrue reachOffset'reachOffsetNoLine' splitAtBLbytestring-0.11.3.1Data.ByteString.LazysplitAt splitAtTL text-1.2.5.0Data.Text.Lazy stringPretty charPretty charPretty' expandTabCharMonoid Data.VoidVoidControl.Monad.Failfailfmap GHC.ClassesOrd mergeErrorData.Traversable Traversable showErrorItemerrorItemLengthshowErrorFancyerrorFancyLengthmessageItemsPrettyorListcanonicalizeTokensunexpexpenes Data.EitherLeftRight$fMonadParsecesRWST$fMonadParsecesRWST0 longestMatchmzeroreturnemptypureDbgItemdbgLogBlindGHC.ShowShow Debug.Tracetrace showStream streamDelta streamTakeData.Functor.IdentityIdentity initialStateControl.Applicativeoptional/parser-combinators-1.3.0-88KGhmkz8neAczPN45sOph skipSomeTill skipManyTill skipCountskipSomeskipMany sepEndBy1sepEndBysepBy1sepBy someTill_someTill manyTill_manyTillendBy1endBycount'countControl.Applicative.CombinatorsoptioneitherPchoicebetween GHC.UnicodeGeneralCategoryisHSpaceGT indentedItems ghc-bignumGHC.Num.IntegerIntegerdecimal_)scientific-0.3.7.0-1TWVLTnDh4ADU7EwmydYIK ScientificDoubleGHC.WordWord8Word16Word32Word64GHC.IntInt8Int16Int32Int64finiteByteSizetoChartoUppertoLowerisDigit