!$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~|(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskellorg experimentalportableSafe345haddock-libraryb is a set of instructions for marking up documentation. In fact, it's really just a mapping from DocX to some other type [a], where [a] is usually the type of the output (HTML, say). Use  to apply a  to a . haddock-library1A qualified identifier that couldn't be resolved."haddock-library6This constructor has no counterpart in Haddock markup..haddock-libraryA (HTML) anchor.Uhaddock-libraryWith the advent of P, we may want to start attaching more meta-data to comments. We make a structure for this ahead of time so we don't have to gut half the core each time we want to add such info.[ 210/.-,+*)('&%$#"! 3465789:;>=<?@BACDFEGHJIKLNMOPQRTSUVXWYZ[UVXWQRTSYZPOKLNMGHJICDFE?@BA:;>=<7893465210/.-,+*)('&%$#"!  None ;<=FKT$haddock-libraryAlways succeeds, but returns 1 if at the end of input. Does not consume input.haddock-library5Fails if at the end of input. Does not consume input.haddock-library3Parses the given string. Returns the parsed string.haddock-library\Scan the input text, accumulating characters as long as the scanning function returns true.haddock-libraryVApply a parser for a character zero or more times and collect the result in a string.haddock-libraryUApply a parser for a character one or more times and collect the result in a string.haddock-libraryParse a decimal number.haddock-libraryParse a hexadecimal number.haddock-library scan functionhaddock-library initial stateK(c) Mateusz Kowalczyk 2013-2014, Simon Hengel 2013BSD-likehaddock@projects.haskell.org experimentalportableNone-haddock-library)Characters that count as horizontal spacehaddock-library(Skip and ignore leading horizontal spacehaddock-libraryTake leading horizontal spacehaddock-library!Remove escapes from given string.GOnly do this if you do not process (read: parse) the input any further.haddock-libraryConsume characters from the input up to and including the given pattern. Return everything consumed except for the end pattern itself.Safe.haddock-libraryThe identity markupSafe4!haddock-library Concat using .haddock-libraryLike  but also joins the U info.haddock-libraryWe do something perhaps unexpected here and join the meta info in reverse : this results in the metadata from the latest  paragraphs taking precedence.haddock-library'This is not a monoidal append, it uses  for the W and X.K(c) Mateusz Kowalczyk 2013-2014, Simon Hengel 2013BSD-likehaddock@projects.haskell.org experimentalportableNone%`.haddock-library!table cell: top left bottom righthaddock-libraryGIdentifier string surrounded with opening and closing quotes/backticks.haddock-libraryTDrops the quotes/backticks around all identifiers, as if they were valid but still s.haddock-library Maps over s over  with potentially failing conversion using user-supplied function. If the conversion fails, the identifier is deemed to not be valid and is treated as a regular string.haddock-librarySMain entry point to the parser. Appends the newline character to the input string.haddock-library Variant of  for  instead of haddock-library5Parse a text paragraph. Actually just a wrapper over ! which drops leading whitespace.haddock-libraryParses and processes 9https://en.wikipedia.org/wiki/Numeric_character_referenceNumeric character referencesparseString "&#65;" DocString "A"haddock-libraryList of characters that we use to delimit any special markup. Once we have checked for any of these and tried to parse the relevant markup, we can assume they are used as regular text.haddock-libraryPlain, regular parser for text. Called as one of the last parsers to ensure that we have already given a chance to more meaningful parsers before capturing their characers.haddock-librarySkips a single special character and treats it as a plain string. This is done to skip over any special characters belonging to other elements but which were not deemed meaningful at their positions.haddock-libraryEmphasis parser.parseString "/Hello world/"%DocEmphasis (DocString "Hello world")haddock-library Bold parser.parseString "__Hello world__"!DocBold (DocString "Hello world")haddock-libraryLike ., but unconditionally take escaped characters.haddock-libraryLike ., but unconditionally take escaped characters.haddock-libraryEText anchors to allow for jumping around the generated documentation.parseString "#Hello world#"DocAName "Hello world"haddock-libraryMonospaced strings.parseString "@cruel@"!DocMonospaced (DocString "cruel")haddock-library Module names.Note that we allow # and '\'8 to support anchors (old style anchors are of the form SomeModule\#anchor).haddock-library[Picture parser, surrounded by << and >>. It's possible to specify a title for the picture.parseString "<<hello.png>>"CDocPic (Picture {pictureUri = "hello.png", pictureTitle = Nothing})!parseString "<<hello.png world>>"HDocPic (Picture {pictureUri = "hello.png", pictureTitle = Just "world"})haddock-library,Inline math parser, surrounded by \( and \).IparseString "\\(\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}\\)"EDocMathInline "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"haddock-library-Display math parser, surrounded by \[ and \].IparseString "\\[\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}\\]"FDocMathDisplay "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"haddock-libraryParagraph parser, called by .haddock-library!Provides support for grid tables.Tables are composed by an optional header and body. The header is composed by a single row. The body is composed by a non-empty list of rows.Example table with header: w+----------+----------+ | /32bit/ | 64bit | +==========+==========+ | 0x0000 | @0x0000@ | +----------+----------+%Algorithms loosely follows ideas in Chttp://docutils.sourceforge.net/docutils/parsers/rst/tableparser.pyhaddock-library1Fourth step. Given the locations of cells, forms 3 structure.haddock-libraryParse @since annotations.haddock-library(Headers inside the comment denoted with = signs, up to 6 levels deep."snd <$> parseOnly header "= Hello"MRight (DocHeader (Header {headerLevel = 1, headerTitle = DocString "Hello"}))#snd <$> parseOnly header "== World"MRight (DocHeader (Header {headerLevel = 2, headerTitle = DocString "World"}))haddock-library Parses unordered (bullet) lists.haddock-library*Parses ordered lists (numbered or dashed).haddock-libraryGeneric function collecting any further lines belonging to the list entry and recursively collecting any further lists in the same paragraph. Usually used as >someListFunction = listBeginning *> innerList someListFunctionhaddock-libraryParses definition lists.haddock-libraryDrops all trailing newlines.haddock-libraryMain worker for  and . We need the u here to be able to tell in the respective functions whether we're dealing with the next list or a nested paragraph.haddock-libraryUsed by  and  to parse any nested paragraphs.haddock-library5Attempts to fetch the next list if possibly. Used by  and G to recursively grab lists that aren't separated by a whole paragraph.haddock-library Helper for  and Q which simply takes a line of text and attempts to parse more list content with .haddock-library;Parses an indented paragraph. The indentation is 4 spaces.haddock-library1Grab as many fully indented paragraphs as we can.haddock-library-Takes a non-empty, not fully whitespace line.%Doesn't discard the trailing newline.haddock-library*Takes indentation of first non-empty line.More precisely: skips all whitespace-only lines and returns indentation (horizontal space, might be empty) of that non-empty line.haddock-libraryBlocks of text of the form: > foo > bar > bazhaddock-libraryzParses examples. Examples are a paragraph level entitity (separated by an empty line). Consecutive examples are accepted.haddock-libraryProperty parser..snd <$> parseOnly property "prop> hello world"!Right (DocProperty "hello world")haddock-libraryWParagraph level codeblock. Anything between the two delimiting @ is parsed for markup.haddock-library[Looks for URL-like things to automatically hyperlink even if they weren't marked as links.haddock-libraryParses strings between identifier delimiters. Consumes all input that it deems to be valid in an identifier. Note that it simply blindly consumes characters and does no actual validation itself.haddock-library Parses identifiers with help of . Asks GHC for  from the string it deems valid.haddock-libraryString to parsehaddock-librarywidthhaddock-libraryrowshaddock-librarywidthhaddock-libraryrowshaddock-libraryindex of header separatorSafethaddock-library Helper that encodes and packs a  into a haddock-library"Helper that unpacks and decodes a  into a haddock-libraryCharacter to use when  or  fail for a byte.haddock-libraryBEncode a Haskell String to a list of Word8 values, in UTF8 format.haddock-libraryKDecode a UTF8 string packed into a list of Word8 values, directly to String      !"#$%&'()*+,-./0123456789:;<<=>??@AABCDEEFGHHIJKKLMNNOPQRSSTUVVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~+haddock-library-1.6.1-Pl7hJXD4j1DG1l5dpnXtNDocumentation.Haddock.Types"Documentation.Haddock.Parser.MonadDocumentation.Haddock.MarkupDocumentation.Haddock.DocDocumentation.Haddock.ParserDocumentation.Haddock.Utf8markup!Documentation.Haddock.Parser.Util DocMarkupHMarkup markupEmpty markupStringmarkupParagraph markupAppendmarkupIdentifiermarkupIdentifierUnchecked markupModule markupWarningmarkupEmphasis markupBoldmarkupMonospacedmarkupUnorderedListmarkupOrderedList markupDefListmarkupCodeBlockmarkupHyperlink markupAName markupPicmarkupMathInlinemarkupMathDisplaymarkupProperty markupExample markupHeader markupTableDocHDocEmpty DocAppend DocString DocParagraph DocIdentifierDocIdentifierUnchecked DocModule DocWarning DocEmphasis DocMonospacedDocBoldDocUnorderedListDocOrderedList DocDefList DocCodeBlock DocHyperlinkDocPic DocMathInlineDocMathDisplayDocAName DocProperty DocExamples DocHeaderDocTableTabletableHeaderRows tableBodyRowsTableRow tableRowCells TableCelltableCellColspantableCellRowspantableCellContentsExampleexampleExpression exampleResultHeader headerLevel headerTitlePicture pictureUri pictureTitle Hyperlink hyperlinkUrlhyperlinkLabelPackageVersionMetaDoc_meta_docMeta_version_packageoverDocoverDocF$fBitraversableDocH$fBifoldableDocH$fBifunctorDocH$fBitraversableMetaDoc$fBifoldableMetaDoc$fBifunctorMetaDoc$fEqMeta $fShowMeta $fEqHyperlink$fShowHyperlink $fEqPicture $fShowPicture $fEqHeader $fShowHeader$fFunctorHeader$fFoldableHeader$fTraversableHeader $fEqExample $fShowExample $fEqTableCell$fShowTableCell$fFunctorTableCell$fFoldableTableCell$fTraversableTableCell $fEqTableRow$fShowTableRow$fFunctorTableRow$fFoldableTableRow$fTraversableTableRow $fEqTable $fShowTable$fFunctorTable$fFoldableTable$fTraversableTable$fEqDocH $fShowDocH $fFunctorDocH$fFoldableDocH$fTraversableDocH $fEqMetaDoc $fShowMetaDoc$fFunctorMetaDoc$fFoldableMetaDoc$fTraversableMetaDocParser ParserStateparserStateSinceinitialParserStatesetSince parseOnlypeekChar peekChar'stringscan takeWhile takeWhile1decimal hexadecimal$fIsStringParsecT$fEqParserState$fShowParserStateidMarkup docConcat metaConcat metaDocConcat metaDocAppend metaAppend emptyMetaDoc docAppend docParagraph Identifier toRegularoverIdentifier parseParas parseString$fShowTC encodeUtf8 decodeUtf8baseGHC.BaseNothinghorizontalSpaceskipHorizontalSpacetakeHorizontalSpace removeEscapes takeUntil makeLabeled<|>TCString parseText text-1.2.3.0Data.Text.InternalTextparseParagraph encodedChar specialCharstring'skipSpecialCharemphasisbold takeWhile_ takeWhile1_anchor monospace moduleNamepicture mathInline mathDisplay paragraphtable tableStepFoursinceheader unorderedList orderedList innerListdefinitionListdropNLsmore Data.EitherEitherinnerParagraphs moreListItems moreContentindentedParagraphsdropFrontOfParatakeNonEmptyLine takeIndent birdtracksexamplesproperty codeblockautoUrl parseValid identifier tableStepTwotableStepThreebytestring-0.10.8.2Data.ByteString.Internal ByteStringreplacementCharacterencodedecode