Z[      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ  Safe-InferredLookup an entity, using  if it starts with  # and  otherwise %Lookup a numeric entity, the leading '#'! must have already been removed. & lookupNumericEntity "65" == Just 'A' ' lookupNumericEntity "x41" == Just 'A' ( lookupNumericEntity "x4E" === Just 'N' ( lookupNumericEntity "x4e" === Just 'N' * lookupNumericEntity "Haskell" == Nothing # lookupNumericEntity "" == Nothing 4 lookupNumericEntity "89439085908539082" == Nothing Lookup a named entity, using  % lookupNamedEntity "amp" == Just '&' ( lookupNamedEntity "haskell" == Nothing 1Escape a character before writing it out to XML.  escapeXMLChar 'a' == Nothing ! escapeXMLChar '&' == Just "amp" 1A table mapping XML entity names to code points.  Does not include apos. as Internet Explorer does not know about it. 1A table mapping HTML entity names to code points None LA class to generalise TagSoup parsing over many types of string-like types. + Examples are given for the String type.   empty = ""   cons = (:)  uncons [] = Nothing  uncons (x:xs) = Just (x, xs)  toString = id  fromString = id  fromChar = return  strConcat = concat   strNull = null   append = (++) +Convert a String from one type to another.  [\]^_      [\]^_NoneDA single HTML element. A whole document is represented by a list of Tag.  There is no requirement for  and  to match. 'Meta: The position of a parsed element 'Meta: A syntax error in the input file  A comment 3A text node, guaranteed not to be the empty string A closing tag An open tag with s in their original order (The column of a position, starting at 1 The row/"line of a position, starting at 1 An HTML attribute id="name" generates ("id","name")  Test if a  is a   Test if a  is a   Test if a  is a  Extract the string from within  , otherwise ` Extract the string from within , crashes if not a  HExtract all text content from tags (similar to Verbatim found in HaXml) ! Test if a  is a  "Extract the string from within  , otherwise ` # Test if a  is a  $'Extract an attribute, crashes if not a .  Returns "" if no attribute present. %Returns True if the  is  and matches the given name &Returns True if the  is  and matches the given name abcdef !"#$%&gabcdef !"#$%&abcdef !"#$%&gNone'match an opening tag (match an closing tag ) match a text +match a opening tag's name literally ,match a closing tag's name literally .8Match a tag with given name, that contains an attribute -with given name, that satisfies a predicate. 'If an attribute occurs multiple times, all occurrences are checked. / Check if the 'Tag str' is  and matches the given name 0 Check if the 'Tag str' is  and matches the given name '()*+,-./01234567'()*+,-./01234567'()*+,-./01234567'()*+,-./01234567None;@Convert a list of tags into a tree. This version is not lazy at % all, that is saved for version 2. =(This operation is based on the Uniplate universe function. Given a H list of trees, it returns those trees, and all the children trees at  any level. For example:   universeTree S [TagBranch "a" [("href","url")] [TagBranch "b" [] [TagLeaf (TagText "text")]]] S == [TagBranch "a" [("href","url")] [TagBranch "b" [] [TagLeaf (TagText "text")]]] 2 ,TagBranch "b" [] [TagLeaf (TagText "text")]] BThis operation is particularly useful for queries. To collect all "a"  tags in a tree, simply do: 0 [x | x@(TagTree "a" _ _) <- universeTree tree] >(This operation is based on the Uniplate  transform function. Given a G list of trees, it applies the function to every tree in a bottom-up J manner. This operation is useful for manipulating a tree - for example % to make all tag names upper case:  upperCase = transformTree f S where f (TagBranch name atts inner) = [TagBranch (map toUpper name) atts inner]  f x = x 89:;<=>h89:;<=>8:9;<>=8:9;<=>hNone ?These options control how  parseTags works. The ?% type is usually generated by one of  G, H or F), then selected fields may be overriden.  The options A and B specify whether to generate   or ? elements respectively. Usually these options should be set to False e to simplify future stages, unless you rely on position information or want to give malformed HTML  messages to the end user.  The options C and D# control how entities, for example &nbsp; are handled. , Both take a string, and a boolean, where True3 indicates that the entity ended with a semi-colon ;.  Inside normal text CE will be called, and the results will be inserted in the tag stream.  Inside a tag attribute DD will be called, and the first component of the result will be used I in the attribute, and the second component will be appended after the  value (usually the second  component is []4). As an example, to not decode any entities, pass:  parseOptions D {optEntityData=\(str,b) -> [TagText $ "&" ++ str ++ [';' | b]] ? ,optEntityAttrib\(str,b) -> ("&" ++ str ++ [';' | b], []) AShould ? values be given before some items (default=False,fast=False). BShould , values be given (default=False,fast=False) C+How to lookup an entity (Bool = has ending ';') D;How to lookup an entity in an attribute (Bool = has ending ';'?) ERequire no adjacent " values (default=True,fast=False) FA ?G structure using a custom function to lookup attributes. Any attribute 0 that is not found will be left intact, and a  given (if B is set). 9If you do not want to resolve any entities, simpliy pass  const Nothing for the lookup function. G.The default parse options value, described in ?. Equivalent to  F . HA ?< structure optimised for speed, following the fast options. i'Change the underlying string type of a ? value. ?@ABCDEFGHi ?@ABCDEFGHi?@ABCDEFGHiNone8jklmnopqrstuvwxyz{|}~6jklmnopqrstuvwxyz{|}~!jklmnopqrst~}|{zyxwvu None,) None None NoneIThese options control how P works. %The strange quirk of only minimizing <br>+ tags is due to Internet Explorer treating  <br></br> as <br><br>. K=Escape a piece of text (default = escape the four characters &"<>) L Minimise <b></b> -> <b/> (default = minimise only <br> tags) MAShould a tag be output with no escaping (default = true only for script) NReplace the four characters &"<>) with their HTML entities (the list from ). O/The default render options value, described in I. PYShow a list of tags, as they might have been parsed, using the default settings given in  I. \ renderTags [TagOpen "hello" [],TagText "my&",TagClose "world"] == "<hello>my&amp;</world>" Q3Show a list of tags using settings supplied by the I parameter, 6 eg. to avoid escaping any characters one could do: J renderTagsOptions renderOptions{optEscape = id} [TagText "my&"] == "my&" IJKLMNOPQ IJKLMNOPQIJKLMNOPQ NoneRDParse a string to a list of tags, using an HTML 5 compliant parser. [ parseTags "<hello>my&amp;</world>" == [TagOpen "hello" [],TagText "my&",TagClose "world"] SAParse a string to a list of tags, using settings supplied by the ? parameter, ' eg. to output position information: R parseTagsOptions parseOptions{optTagPosition = True} "<hello>my&amp;</world>" == i [TagPosition 1 1,TagOpen "hello" [],TagPosition 1 8,TagText "my&",TagPosition 1 15,TagClose "world"] RS ?@ABCDEFGHRSRSNoneTDefine a class to allow String' s or Tag str's to be used as matches V5Turns all tag names and attributes to lower case and # converts DOCTYPE to upper case. WHPerforms an inexact match, the first item should be the thing to match. M If the second item is a blank string, that is considered to match anything.  For example:  - (TagText "test" ~== TagText "" ) == True - (TagText "test" ~== TagText "test") == True . (TagText "test" ~== TagText "soup") == False For . missing attributes on the right are allowed. X Negation of W Y;This function takes a list, and returns all suffixes whose % first item matches the predicate. ZThis function is similar to Y, but splits the list 0 so no element appears in any two partitions. TUVWXYZ2 !"#$%&?@ABCDEFGHIJKLMNOPQRSTUVWXYZ2RS?@ABCDEGHFPQNIJKLMOV!#%&$" YZTUWXTUVWXYZ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOPQRSTU V V W X Y Z [ \ ] ^ _`abcdefghijklmnoopqrstuvwxyyz{|}~      5 _tagsoup-0.12.8Text.HTML.TagSoup.EntityText.StringLikeText.HTML.TagSoupText.HTML.TagSoup.MatchText.HTML.TagSoup.TreeText.HTML.TagSoup.TypeText.HTML.TagSoup.Options Text.HTML.TagSoup.ImplementationText.HTML.TagSoup.SpecificationText.HTML.TagSoup.ManualText.HTML.TagSoup.GeneratedText.HTML.TagSoup.RenderText.HTML.TagSoup.Parser lookupEntitylookupNumericEntitylookupNamedEntity escapeXMLChar xmlEntities htmlEntities StringLikeemptyconsunconstoString fromStringfromChar strConcatstrNullappend castStringTag TagPosition TagWarning TagCommentTagTextTagCloseTagOpenColumnRow Attribute isTagOpen isTagClose isTagText maybeTagText fromTagText innerText isTagWarningmaybeTagWarning isTagPosition fromAttrib isTagOpenNameisTagCloseNametagOpentagClosetagText tagComment tagOpenLit tagCloseLittagOpenAttrLittagOpenAttrNameLittagOpenNameLittagCloseNameLitanyAttr anyAttrName anyAttrValue anyAttrLitanyAttrNameLitanyAttrValueLit getTagContentTagTreeTagLeaf TagBranchtagTree flattenTree universeTree transformTree ParseOptionsoptTagPosition optTagWarning optEntityDataoptEntityAttriboptTagTextMergeparseOptionsEntities parseOptionsparseOptionsFast RenderOptions optEscape optMinimize optRawTag escapeHTML renderOptions renderTagsrenderTagsOptions parseTagsparseTagsOptionsTagReptoTagRepcanonicalizeTags~==~/=sections partitions$fStringLikeText$fStringLikeText0$fStringLikeByteString$fStringLikeByteString0$fStringLike[]base Data.MaybeNothingPosition nullPositionpositionString positionChar tagPosition $fFunctorTag$fFunctorTagTreefmapParseOptionsOutable&SstlhdeofnextposOutPosWarn EntityEnd EntityHex EntityNum EntityName CommentEndComment TagEndCloseTagEndAttValAttNameTagShutCharerrSeenerrWantexpandampCharampOutstateoutput entityChrisEofisCharisTag isTagShut isAttNameisAttValisTagEnd isTagEndClose isComment isCommentEnd isEntityNameisEntityNumHex isEntityNum isEntityHex isEntityEndisWarnfromChrfromWarn getEntityEnd tagTextMerge $fOutableOut $fOutableCharParserTypeTagTypeDeclTypeXml TypeNormalwhiteparsedat charReferenceneilXmlTagOpenneilXmlTagClose neilTagEnd closeTagOpentagName beforeAttNameattName afterAttNamebeforeAttValueattValueDQuotedattValueSQuotedattValueUnquotedcharRefAttValueafterAttValueQuotedselfClosingStartTag bogusComment bogusComment1markupDeclOpen commentStartcommentStartDashcommentcommentEndDash commentEndcommentEndBangcommentEndSpace cdataSectioncharRef charRefNum charRefNum2 charRefNum3 charRefAlpha charRefAlpha2 alphaCharhexChar $fTagRep[] $fTagRepTag