!!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafe S      !"#B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-later Trustworthy24567M;p"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/rfc3986RFC3986NOTE: The special empty  is valid for denoting s that aren't in any namespace.XXML local namesInvariant: MUST be a proper *https://www.w3.org/TR/xml-names/#NT-NCNameNCNameX(XML (expanded) namespace-qualified namesUsed by  and . 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 set accordingly. The special empty  (see also 6) is only allowed iff   is  (i.e. when the name is  unprefixed) X denotes an unprefixed name;  denotes a prefixed name.Invariant: MUST be a proper  *https://www.w3.org/TR/xml-names/#NT-NCNameNCName (unless ) 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 attributesXANote that the default namespace doesn't apply to unprefixed namesX XML elementsX XML content%XRepresents a XML commentInvariant: SHOULD not contain -- (occurences of --& will be automatically substituted by -~ on serialization)'XProcessing instruction)XInvariant: MUST be a   but not be  [Xx][Mm][Ll] (see also  &https://www.w3.org/TR/xml/#NT-PITargetPITarget and  https://www.w3.org/TR/xml-names/)*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 namesNOTE: This value is not a proper .8XEmpty text-node9XBlank elements$__NOTE: This value is not a propler .$XeCompares 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)%XYCompares namespace URI and local name for equality (i.e. the namespace prefix is ignored); $"# !%&'(*)+,-./432105&6789 (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafeE'X  S ::= (#x20 | #x9 | #xD | #xA)+(X Char ::= x9 | xA | xD | [x20- xD7FF] | [xE000- xFFFD] | [x10000-#x10FFFF])X/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)**XSee )+XReturn ," if list contains duplicate values '-()*./01+23/6 (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafe=?^t:X)Convenience class for converting to/from  values;Xupcast or generalize to <Xdowncast+ or specialize (if possible) to a specific  subtype4X%(currently private) Specialize to an  if possibleTThis method is included in this class as an optimization over the default impl below=X Convert a ! to its text-representation, i.e. QName ::= PrefixedName | UnprefixedName PrefixedName ::= Prefix ':' LocalPart UnprefixedName ::= LocalPart Prefix ::= NCName LocalPart ::= NCName See also  <qnameToText (QName "foo" "urn:example.org:bar" (Just "doo")) "doo:foo"7qnameToText (QName "foo" "urn:example.org:bar" Nothing)"foo" See also >>X Decode a # from its text-representation (see =)This is the inverse to the = function. However, =Z is a lossy conversion, therefore this function needs to reconstruct the namespace (i.e.  d) with the help of a lookup function provided in the first argument: The lookup functions takes a # which can be eitherthe empty string (i.e. ""&) which denotes an unprefixed name, or a non-empty NCName& string which denotes a prefixed name.>The result of this function shall be the respective namespace ) to associate with this QName. An empty W may be returned In case of unprefixed names to denote the name being in no namespace.Finally, this function returns O in case of syntax errors or when the prefix lookup function returns an empty  (see 6) for a prefixed name.5XConvenient for e.g. -:4<;=> (c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafe_E?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 nsAXConvert 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)6X/Check rules imposed on reserved namespaces by  https://www.w3.org/TR/xml-names/% as well as other basic constraints.BX@Verify whether sub-tree is wellformed with respect to namespaces:The first argument denotes an optional parent context of xmlns'-declarations that are in scope (where # and 2 have the same semantics as for the arguments of ?H). In case of duplicate prefixes, earlier entries shadow later entries.NOTEE: This function doesn't take into account the namespace prefixes of xs:QNameM-valued text-nodes or attributes; if you need to handle such cases, see the C function.CX Variant of B which supports introspecting xs:QName" valued attributes and text-nodes.KThe first argument is a function for extracting a (possibly empty) list of 's from attribute values and text-nodes: Its first 7  [] argument denotes either a (non-empty) attribute or an element's children which contain at least one non-empty text-node fragment.The second argument of type [] denotes the path of element s in reverse order (i.e. the top-level element of the traversal is last item in this list) leading to the currently focused attribute or text-node.This _ extracing function may return a list to accomodate for test fields which may contain multiple xs:QName such as e.g. for <xs:list itemType="xs:QName" />The  % function can be useful for decoding xs:QNames text values.Mxmlns_elem_wellformed' (\_ _ -> []) topns el = xmlns_elem_wellformed topns el?XDnamespace prefix (if empty, denotes the default namespace; see also @)X Namespace URI@XDefault namespace URI (use empty  to reset default namespace) &89:?@A6BC(c) Herbert Valerio Riedel 2019GPL-3.0-or-laterSafebA ! #"$%&'()*+,-./0123456789=>?@ABCA5./01234-+,9BC?@A! #"$'()* 8%& 7=> 6B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafeDXtGet the text value of an XML element. This function ignores non-text elements, and concatenates all text elements.EX4Select only the elements from a list of XML content.FX'Select only the elements from a parent.GX0Select only the text from a list of XML content.HX0Find all immediate children with the given name.IX4Filter all immediate children wrt a given predicate.JXEFilter all immediate children wrt a given predicate over their names.KX,Find an immediate child with the given name.LX,Find an immediate child with the given name.MX7Find an immediate child with name matching a predicate.NX@Find the left-most occurrence of an element matching given name.OXCFilter the left-most occurrence of an element wrt. given predicate.PXCFilter the left-most occurrence of an element wrt. given predicate.QXFind 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).RXFind 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).SXFind 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).TX!Lookup the value of an attribute.UX Lookup attribute name from list.VXDLookup the first attribute whose name satisfies the given predicate.WXRLookup the value of the first attribute whose name satisfies the given predicate.DEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVWB(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafe"#XX-Options for tweaking XML serialization output]X:Serialize XML 1.0 document prefixed by the XML prologue "<?xml version='1.0' ?>"^XSerialize a sequence of XML  nodes_XDefault rendering options-Allow empty tags for all non-special elements1Don't insert newlines between prolog/epilog nodesDo not sort attributes`XSerialize a XML 5;X#Pretty printing content using ShowS<X%Convert a text element to characters. XYZ[\]^_` ^]`XYZ[\_B(c) Galois, Inc. 2008 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafe "#24567Xk,aX6The position of a piece of content in an XML document.cXThe currently selected content.dX$Siblings on the left, closest first.eX%Siblings on the right, closest first.fX5The contexts of the parent elements of this location.gXGeneral cursorhXlParent path (with the root as last element) consisting of list of left siblings, parent, and right siblingspX!The parent of the given location.qX*The top-most parent of the given location.rX'The left sibling of the given location.sX(The right sibling of the given location.tX&The first child of the given location.uX%The last child of the given location.vX6Find the next left sibling that satisfies a predicate.wX7Find the next right sibling that satisfies a predicate.xX+The first child that satisfies a predicate.yXThe 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.zXRPerform a depth first search for a descendant that satisfies the given predicate.{X1The child with the given index (starting from 0).=X3private: computes the parent for "down" operations.|X#Generalize content type of current g location}X#Specialize content type of current g location~X&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 q( 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.>Xvprivate: Gets the given element of a list. Also returns the preceding elements (reversed) and the following elements.?X7private: combChildren ls x ys = reverse ls ++ [x] ++ ys1abdecfghijklmnopqrstuvwxyz{|}~1ijklmnogabdecfh~|}pq{tursyxvwz B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafe27=? XXML Lexer token.Xopening start-tag (the @, 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 /ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`B(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafe"#27_aX Variant of  that can encode parser bsXParse 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.cXDrop a single leading U+FEFF characterB(c) Galois, Inc. 2007 (c) Herbert Valerio Riedel 2019!BSD-3-Clause AND GPL-3.0-or-laterSafe=?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 namey ! #"$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` :;<d !"#$%&#'()*+,--../011234567894:;<= > ? @ A B C D E FGHIJKLMNOPQRSTUVWXYZ[[\]^_`abcdefghijkklmnopqrstuvwxNyz{|}~                   !"#$%&'()*+,-./01201301456)789:;< = > ? @ AB C D E F G H I J K LMN O P QRSTUVW X Y Z [ \ ]  ^ _ ` a b c d e f g h i j k l m n o p q r s t u vwxyz X-0.3.1.0-FtMev6r53LM7jz5ldGnRwKText.XML.TypesText.XML Text.XML.ProcText.XML.OutputText.XML.CursorText.XML.InputCommonText.XML.Types.CoreUtilsText.XML.Types.Internal Text.XML.NS qnameFromTextText.XML.LexerPosURIunURILNameunLNameQNameqLNameqURIqPrefixNCName CDataKind CDataText CDataVerbatimCDataRawCData cdVerbatimcdDataAttrattrKeyattrValElement'ElementelName elAttribs elContentContentElemTextCRefProcCommCommentPIpiTargetpiDataXmlDeclaration MiscNodesRoot'RootrootXmlDeclaration rootPreElem rootDoctype rootElement rootPostElem isNullURI blank_name blank_cdata blank_element IsContent toContent fromContent qnameToText xmlns_attrxmlns_def_attrxmlns_from_attrxmlns_elem_wellformedxmlns_elem_wellformed' strContent onlyElems elChildrenonlyText findChildrenfilterChildrenfilterChildrenName findChild filterChildfilterChildName findElement filterElementfilterElementName findElementsfilterElementsfilterElementsNamefindAttr lookupAttr lookupAttrBy findAttrBySerializeXMLOptionsserializeAllowEmptyTagserializeProEpilogAddNLsserializeSortAttributesserializeXMLDoc serializeXMLdefaultSerializeXMLOptionsserializeXMLRootCursor'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'TokenTokStartTokEndTokCRefTokTextTokError 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 Control.Monadguard 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 ShortText $fOrdQName $fEqQName ns_xmlns_uriisSisCharisNameStartChar isNameCharnoDupesTrueisNCNameunsnoc<+>bFromShortTextbUnlinesdecodeCharRefHexdecodeCharRefDectoElem$fIsContentEitherxmlns_attr_wellformed Data.EitherEither xmlNamesNSxmlnsNS ns_xml_uri ppContentS showCDataS downParents splitChildren combChildrenBoolTxtCRefBitTxtBitLexContLStringLCharnullNseofErrscanXML'eolNormtokens1sDatatokens2charDataprocinsspecialqualNametagattribsattribattr_val dropSpacebreak'breakn decode_attr decode_text cref_to_charnum_esccvt_charsimpleTokenize isValidQNameContentFFailuredropBOM