!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafeR !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_(c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafe`X  S ::= (#x20 | #x9 | #xD | #xA)+aX Char ::= x9 | xA | xD | [x20- xD7FF] | [xE000- xFFFD] | [x10000-#x10FFFF]bX/NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [xC0-xD6] | [xD8-xF6] | [xF8- x2FF] | [x370- x37D] | [x37F- x1FFF] | [x200C- x200D] | [x2070- x218F] | [x2C00- x2FEF] | [x3001- xD7FF] | [xF900- xFDCF] | [xFDF0- xFFFD] | [x10000-xEFFFF]1NameChar ::= NameStartChar | "-" | "." | [0-9] | xB7 | [x0300- x036F] | [ x203F-#x2040]"Name ::= NameStartChar (NameChar)*cXSee b `dabcefghijf6B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone24567MH$X+Position expressed in number of code-pointsA negative value denotes EOFXURIs resembling anyURIInvariant: MUST be a valid  URI-reference as defined in #https://tools.ietf.org/html/rfc3986RFC3986XXML local namesInvariant: MUST be a proper *https://www.w3.org/TR/xml-names/#NT-NCNameNCNameXXML (expanded) qualified names XLocal name part XInvariant: the  c field MUST always be populated with the proper namespace. Specifically, entities belonging to the  http://www.w3.org/2000/xmlns/ or  $http://www.w3.org/XML/1998/namespace must have the   field accordingly XInvariant: MUST be a proper *https://www.w3.org/TR/xml-names/#NT-NCNameNCName XA *https://www.w3.org/TR/xml-names/#NT-NCNameNCName.NB: Among other properties this means that an  ! shall never be the empty string.X9Ordinary character data; pretty printer escapes &, < etc.XAUnescaped character data; pretty printer embeds it in <![CDATA[..X[As-is character data; pretty printer passes it along without any escaping or CDATA wrap-up.X XML CDataXXML attributesX XML elementsX XML content%XRepresents a XML commentInvariant: SHOULD not contain -- (occurences of --& will be automatically substituted by -~ on serialization)'XProcessing instruction)XInvariant: MUST not be  [Xx][Mm][Ll]*XInvariant: MUST not contain ?>+X Denotes the 6<?xml version="1.0" encoding="..." standalone="..." ?> declaration-X!Sequence of "miscellaneous" nodes.X4Represents the implicit root node of an XML document0X(optional) XML declaration1X=Miscellaneous nodes before root element & DOCTYPE declaration2XZoptional DOCTYPE declaration and more miscellaneous nodes between DOCTYPE and root element3X The single root document element4X&Miscellaneous nodes after root element6X Test for empty isNullURI (URI mempty)TrueisNullURI (URI "")TrueisNullURI (URI " ")False7X Blank names8X Blank cdata9XBlank elements:XSmart constructor for  xmlns:<prefix> = <namespace-uri> Invariant: <namespace-uri>) MUST be non-empty for non-empty prefixes;XSmart constructor for xmlns = [<namespace-uri>|""]+ (i.e. for declaring the default namespace)%xmlns_attr "" ns == xmlns_def_attr ns<XConvert xmlns  into a (prefix,namespace-uri) pair; returns * if the argument isn't a xmlns attribute.-An empty prefix denotes the default-namespace4xmlns_from_attr (xmlns_attr pfx ns) == Just (pfx,ns)CXeCompares namespace URI and local name for equality (i.e. the namespace prefix is effectively ignored)The  http://www.w3.org/2000/xmlns/U namespace is considered less than any other namespace (including the null namespace)DXYCompares namespace URI and local name for equality (i.e. the namespace prefix is ignored):XDnamespace prefix (if empty, denotes the default namespace; see also ;)X Namespace URI;XDefault namespace URI (use empty  to reset default namespace)= $"# !%&'(*)+,-./4321056789:;<=5./43210-+,'(*)%&$"# !   6789:;< (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterNone=?P~X)Convenience class for converting to/from  valuesXupcast or generalize to Xdowncast+ or specialize (if possible) to a specific  subtypekX%(currently private) Specialize to an  if possibleTThis method is included in this class as an optimization over the default impl belowlXConvenient for e.g. -~kB(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNonek/XtGet the text value of an XML element. This function ignores non-text elements, and concatenates all text elements.X4Select only the elements from a list of XML content.X'Select only the elements from a parent.X0Select only the text from a list of XML content.X0Find all immediate children with the given name.X4Filter all immediate children wrt a given predicate.XEFilter all immediate children wrt a given predicate over their names.X,Find an immediate child with the given name.X,Find an immediate child with the given name.X7Find an immediate child with name matching a predicate.X@Find the left-most occurrence of an element matching given name.XCFilter the left-most occurrence of an element wrt. given predicate.XCFilter the left-most occurrence of an element wrt. given predicate.XFind all non-nested occurances of an element. (i.e., once we have found an element, we do not search for more occurances among the element's children).XFind all non-nested occurrences of an element wrt. given predicate. (i.e., once we have found an element, we do not search for more occurances among the element's children).XFind all non-nested occurences of an element wrt a predicate over element names. (i.e., once we have found an element, we do not search for more occurances among the element's children).X!Lookup the value of an attribute.X Lookup attribute name from list.XDLookup the first attribute whose name satisfies the given predicate.XRLookup the value of the first attribute whose name satisfies the given predicate.B(c) Galois, Inc. 2008 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone "#24567X2,X6The position of a piece of content in an XML document.XThe currently selected content.X$Siblings on the left, closest first.X%Siblings on the right, closest first.X5The contexts of the parent elements of this location.XGeneral cursorXlParent path (with the root as last element) consisting of list of left siblings, parent, and right siblingsX!The parent of the given location.X*The top-most parent of the given location.X'The left sibling of the given location.X(The right sibling of the given location.X&The first child of the given location.X%The last child of the given location.X6Find the next left sibling that satisfies a predicate.X7Find the next right sibling that satisfies a predicate.X+The first child that satisfies a predicate.XThe next position in a left-to-right depth-first traversal of a document: either the first child, right sibling, or the right sibling of a parent that has one.XRPerform a depth first search for a descendant that satisfies the given predicate.X1The child with the given index (starting from 0).mX3private: computes the parent for "down" operations.X#Generalize content type of current  locationX#Specialize content type of current  locationX&A cursor for the given (root) element.XConstruct cursor from document 5X3Computes the root element containing this location.NOTE,: The root element might have siblings; see  or ( if you need to deal with such siblings.XConstructs the document 5 containing this location.Returns *< if invalid top-level "miscellaneous" nodes are encountered.X"Are we at the top of the document?XPAre we at the left end of the the document (i.e. the locally left-most sibling)?XNAre we at the right end of the document (i.e. the locally right-most sibling)?X%Are we at the bottom of the document?XDo we have a parent?X;Get the node index inside the sequence of children/siblingsXDo we have children?X3Insert content to the left of the current position.X4Insert content to the right of the current position.X?Remove the content on the left of the current position, if any.X@Remove the content on the right of the current position, if any.XbInsert content to the left of the current position. The new content becomes the current position.XcInsert content to the right of the current position. The new content becomes the current position.XERemove the current element. The new position is the one on the left.XFRemove the current element. The new position is the one on the right.XPRemove the current element. The new position is the parent of the old position.nXvprivate: Gets the given element of a list. Also returns the preceding elements (reversed) and the following elements.oX7private: combChildren ls x ys = reverse ls ++ [x] ++ ys11B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone"#4X-Options for tweaking XML serialization outputX:Serialize XML 1.0 document prefixed by the XML prologue "<?xml version='1.0' ?>"XSerialize a sequence of XML  nodesXDefault rendering options-Allow empty tags for all non-special elements1Don't insert newlines between prolog/epilog nodesDo not sort attributesXSerialize a XML 5pX#Pretty printing content using ShowSqX%Convert a text element to characters. B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone27=?U XXML Lexer token.Xopening start-tag (the r, field denotes whether this is an empty tag)Xclosing end-tagXcharacter entity referenceXcharacter dataX Lexer errorXWThis type may be used to provide a custom scanning function for extracting characters.XWThis type may be used to provide a custom scanning function for extracting characters.XRun XML lexer over +stuvwxyz{|}~B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone"#27M_X Variant of  that can encode parser sXParse a XML document to an 0If you need access to the prolog and epilog use "An optional (single) leading BOM (U+FEFFF) character will be discard (and not counted in the source positions).XParse a XML document"An optional (single) leading BOM (U+FEFFF) character will be discard (and not counted in the source positions).XparseXML to a list of  chunksNOTE: As opposed to , this function will not discard any BOM characters.XDrop a single leading U+FEFF characterX.Check rules imposed on reserved namespaces by https://www.w3.org/TR/xml-names/B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterNone=?XkA smart element constructor which uses the type of its argument to determine what sort of element to make.XAdd an attribute to an element.X"Add some attributes to an element.XCreate an unqualified name.X!Create node with unqualified nameu ! #"$%&'()*+,-./0123456789:;<~ ~     !"# $%&'()**++,-../01234561789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                           ! " # $ % &' () (* +, - . / 0 12 13 14565758595: ;< ;= ;> ;? @A @B @C @D @E @F @G @H @H @I JK JK JL MN OP OQ OQ ;R ;S ;T UV WX WY WZ W[ W\ W] W^ W_ W` a b c d e f g hijkijlijmno&pqrstuvwxyz{|} ~ 5                             X-0.3.0.0-1lz4vvJeqhX7c0M9qEjpTlText.XML.TypesText.XML Text.XML.ProcText.XML.CursorText.XML.OutputText.XML.InputCommonUtilsText.XML.Types.InternalText.XML.LexerPosURIunURILNameunLNameQNameqLNameqURIqPrefixNCName CDataKind CDataText CDataVerbatimCDataRawCData cdVerbatimcdDataAttrattrKeyattrValElement'ElementelName elAttribs elContentContentElemTextCRefProcCommCommentPIpiTargetpiDataXmlDeclaration MiscNodesRoot'RootrootXmlDeclaration rootPreElem rootDoctype rootElement rootPostElem isNullURI blank_name blank_cdata blank_element xmlns_attrxmlns_def_attrxmlns_from_attr$fNFDataXmlDeclaration $fNFDataPI$fNFDataCDataKind $fNFDataCData $fShowLName $fShowURI $fOrdQName $fEqQName $fNFDataQName $fNFDataAttr$fNFDataElement'$fNFDataContent $fNFDataRoot'$fShowXmlDeclaration$fDataXmlDeclaration$fGenericXmlDeclaration$fShowPI$fDataPI $fGenericPI $fShowComment $fDataComment$fGenericComment$fNFDataComment $fEqCDataKind$fShowCDataKind$fDataCDataKind$fGenericCDataKind $fShowCData $fDataCData$fGenericCData $fOrdLName $fEqLName $fDataLName$fIsStringLName $fNFDataLName$fGenericLName$fOrdURI$fEqURI $fDataURI $fIsStringURI $fNFDataURI $fGenericURI $fShowQName $fDataQName$fGenericQName$fEqAttr $fOrdAttr $fShowAttr $fDataAttr $fGenericAttr$fShowElement'$fDataElement'$fGenericElement'$fFunctorElement'$fFoldableElement'$fTraversableElement' $fShowContent $fDataContent$fGenericContent $fShowRoot' $fDataRoot'$fGenericRoot'$fFunctorRoot'$fFoldableRoot'$fTraversableRoot' IsContent toContent fromContent strContent onlyElems elChildrenonlyText findChildrenfilterChildrenfilterChildrenName findChild filterChildfilterChildName findElement filterElementfilterElementName findElementsfilterElementsfilterElementsNamefindAttr lookupAttr lookupAttrBy findAttrByCursor'CurcurrentleftsrightsparentsCursorPathTagtagName tagAttribsgetTagsetTagfromTagparentrootleftright firstChild lastChildfindLeft findRightnextDFfindRecgetChildupCastdownCastfromRootElementfromRoot toRootElementtoRootisRootisFirstisLastisLeafisChild getNodeIndex hasChildren insertLeft insertRight removeLeft removeRight insertGoLeft insertGoRight removeGoLeft removeGoRight removeGoUp $fNFDataTag$fNFDataCursor' $fShowTag $fGenericTag $fDataTag $fShowCursor'$fGenericCursor' $fDataCursor'$fFunctorCursor'$fFoldableCursor'$fTraversableCursor'SerializeXMLOptionsserializeAllowEmptyTagserializeProEpilogAddNLsserializeSortAttributesserializeXMLDoc serializeXMLdefaultSerializeXMLOptionsserializeXMLRootTokenTokStartTokEndTokCRefTokTextTokError TokXmlDecl TokCommentTokPITokDTDScanner XmlSourceuncons customScannerscanXML parseXMLDoc parseXMLRootparseXML$fNFDataContentF$fShowContentF$fDataContentF$fGenericContentFNodenodeadd_attr add_attrsunqualunode$fNodeShortText $fNode(,) $fNode(,)0 $fNodeText $fNode(,)1 $fNode(,)2 $fNodeCData$fNode[] $fNode(,)3 $fNode(,)4 $fNode(,)5$fNodeElement' $fNode[]0 $fNode(,)6 $fNode(,)7 $fNode(,)8 $fNodeContent $fNode[]1 $fNode(,)9 $fNode(,)10 $fNode(,)11$fNode() $fNodeAttr $fNode[]2base Data.DataDataGHC.Base<$ghc-prim GHC.ClassesOrd>=minmax><compare<=Data.Typeable.InternalTypeable Data.StringIsString fromString Applicativepure<*>*>liftA2<* Data.FoldableFoldableData.Traversable Traversabletraverse GHC.GenericsGenericMonoidmemptymappendmconcat GHC.MaybeMaybeNothingJust GHC.TypesOrderingLTEQGTWordGHC.WordWord8Word16Word32Word64Control.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipListData.Functor.ConstConstgetConst Data.OldListsortData.Ord comparingDown byteSwap64 byteSwap32 byteSwap16 Data.Functor<$> Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybefromJust isNothingisJustmaybeliftA3liftA<**> Alternativeempty<|>somemanydeepseq-1.4.4.0Control.DeepSeqdeepseqNFDatarnf text-1.2.3.1Data.Text.Internal'text-short-0.1.3-6s9Vn5x19Vb5f1556qmx0oData.Text.Short.Internal ShortTextisSisCharisNameStartChar isNameCharisNCNameunsnoc<+>bFromShortTextbUnlines ns_xmlns_uri ns_xml_uritoElem$fIsContentEither downParents splitChildren combChildren ppContentS showCDataSBoolTxtCRefBitTxtBitLStringLCharnullNseofErreolNormtokens0tokens'procinsspecialqualNametagattribsattribattr_val dropSpacebreak'breakn decode_attr decode_text cref_to_charnum_esccvt_charsimpleTokenize isValidQNameContentFFailuredropBOMcheckNS