úÎZASÆ2      !"#$%&'()*+,-./01(c) 2004, Graham Klyne BSD-style (see end of this file) Graham Klyne <gk@ninebynine.org> provisionalportableSafe+0&%Type for authority value within a URI  anonymous@ www.haskell.org :42ORepresents a general universal resource identifier using its component parts.For example, for the URI 3 foo://anonymous@www.haskell.org:42/ghc?query#fragthe components are: foo: //anonymous@www.haskell.org:42 /ghc ?query #frag  Blank URI &Turn a string containing a URI into a  . Returns 2Y if the string is not a valid URI; (an absolute URI with optional fragment identifier).?NOTE: this is different from the previous network.URI, whose parseURI function works like  in this module.Parse a URI reference to a  value. Returns 2o if the string is not a valid URI reference. (an absolute or relative URI with optional fragment identifier).Parse a relative URI to a  value. Returns 2a if the string is not a valid relative URI. (a relative URI with optional fragment identifier).Parse an absolute URI to a  value. Returns 2^ if the string is not a valid absolute URI. (an absolute URI without a fragment identifier).ZTest if string contains a valid URI (an absolute URI with optional fragment identifier).pTest if string contains a valid URI reference (an absolute or relative URI with optional fragment identifier).bTest if string contains a valid relative URI (a relative URI with optional fragment identifier)._Test if string contains a valid absolute URI (an absolute URI without a fragment identifier).,Test if string contains a valid IPv6 address,Test if string contains a valid IPv4 addressReturns 3  if the character is a "reserved" character in a URI. To include a literal instance of one of these characters in a component of a URI, it must be escaped.Returns 3× if the character is an "unreserved" character in a URI. These characters do not need to be escaped in a URI. The only characters allowed in a URI are either "reserved", "unreserved", or an escape sequence (% followed by two hex digits).Turn a  into a string.=Uses a supplied function to map the userinfo part of the URI.„The Show instance for URI uses a mapping that hides any password that may be present in the URI. Use this function with argument id4 to preserve the password in the formatted output.Returns 3& if the character is allowed in a URI.Returns 30 if the character is allowed unescaped in a URI.WescapeURIString isUnescapedInURI "http://haskell.org:80?some_param=true&other_param=W‘"@"http://haskell.org:80?some_param=true&other_param=%D1%97%D2%91"Returns 3: if the character is allowed unescaped in a URI component.`escapeURIString isUnescapedInURIComponent "http://haskell.org:80?some_param=true&other_param=W‘"P"http%3A%2F%2Fhaskell.org%3A80%3Fsome_param%3Dtrue%26other_param%3D%D1%97%D2%91"jEscape character if supplied predicate is not satisfied, otherwise return character as singleton string. 4Can be used to make a string valid for use in a URI.!WTurns all instances of escaped characters in the string back into literal characters."Returns a new + which represents the value of the first ' interpreted as relative to the second . For example: …"foo" `relativeTo` "http://bar.org/" = "http://bar.org/foo" "http:foo" `nonStrictRelativeTo` "http://bar.org/" = "http://bar.org/foo")Algorithm from RFC3986 [3], section 5.2.2#Returns a new ) which represents the value of the first ( interpreted as relative to the second .'Algorithm from RFC3986 [3], section 5.2$CReturns the segments of the path component. E.g., pathSegments  $ parseURI " http://example.org/foo/bar/baz" == ["foo", "bar", "baz"]4:Split last (name) segment from path, returning (path,name)%Returns a new 7 which represents the relative location of the first  with respect to the second q. Thus, the values supplied are expected to be absolute URIs, and the result returned may be a relative URI.Example: ~"http://example.com/Root/sub1/name2#frag" `relativeFrom` "http://example.com/Root/sub2/name2#frag" == "../sub1/name2#frag"{There is no single correct implementation of this function, but any acceptable implementation must satisfy the following: 6(uabs `relativeFrom` ubase) `relativeTo` ubase == uabs#For any valid absolute URI. (cf.  9http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html  9http://lists.w3.org/Archives/Public/uri/2003Jan/0005.html)&fCase normalization; cf. RFC3986 section 6.2.2.1 NOTE: authority case normalization is not performed'3Encoding normalization; cf. RFC3986 section 6.2.2.2(7Path segment normalization; cf. RFC3986 section 6.2.2.3|5 6 789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn a predicate which returns o& if the character should be escapedthe string to processthe resulting URI string!pq"r#stuv$4%wxyz&'()*+,-./01{|}~2  !"#$%&'()*+,-./012  #"% !$&'()*+,-./01r5 6 789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn !pq"r#stuv$4%wxyz&'()*+,-./01{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr56stuvwxyz{|}~€‚ƒnetwo_DarCcUHK1BCJHlIYOjXe67 Network.URIURIAuth uriUserInfo uriRegNameuriPortURI uriScheme uriAuthorityuriPathuriQuery uriFragmentnullURIparseURIparseURIReferenceparseRelativeReferenceparseAbsoluteURIisURIisURIReferenceisRelativeReference isAbsoluteURI isIPv6address isIPv4address uriIsAbsolute uriIsRelative isReserved isUnreserved uriToStringisAllowedInURIisUnescapedInURIisUnescapedInURIComponent escapeURICharescapeURIStringunEscapeStringnonStrictRelativeTo relativeTo pathSegments relativeFrom normalizeCasenormalizeEscapenormalizePathSegmentsparseabsoluteURI escapeStringreserved unreservedscheme authoritypathqueryfragmentbaseGHC.BaseNothingghc-prim GHC.TypesTrue splitLast URIParserdefaultUserInfoMap parseURIAny isValidParseparseAllescaped isGenDelims isSubDelims subDelimsunreservedCharurihierPartuscheme uauthorityuserinfohost ipLiteral ipvFutureisIpvFutureChar ipv6address opt_n_h4c_h4ls32h4ch4 ipv4addressdecOctetregNamenameCharport pathAbEmptypathAbs pathNoScheme pathRootLess slashSegmentsegment segmentNz segmentNzcpcharucharuquery ufragment uriReference relativeRef relativePart absoluteURI isAlphaChar isDigitCharisAlphaNumCharisHexDigitChar isSchemeChar alphaChar digitChar hexDigitChar oneThenMany countMinMax notMatchinguriAuthToStringutf8EncodeCharFalse unEscapeByte unEscapeUtf8 isDefinedremoveDotSegmentselimDots nextSegmentsegments relPathFrom relPathFrom1 relSegsFrom difSegsFromorNull $fShowURI$fNFDataURIAuth $fNFDataURI