Îõ³h&$G"~Ò      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ(c) 2004, Graham Klyne BSD-style (see end of this file) Graham Klyne  provisionalportableSafe56;>K. network-uri%Type for authority value within a URI network-uri  anonymous@ network-uri www.haskell.org network-uri :42 network-uriÏRepresents 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: network-uri foo: network-uri //anonymous@www.haskell.org:42  network-uri /ghc  network-uri ?query  network-uri #fragR network-uri3Add a prefix to a string, unless it already has it.S network-uri3Add a suffix to a string, unless it already has it.  network-uriìGiven a URIAuth in "nonstandard" form (lacking required separator characters), return one that is standard.  network-urièGiven a URI in "nonstandard" form (lacking required separator characters), return one that is standard.T network-uriÙApply the function to the list, unless that list is empty, in which case leave it alone. network-uri Blank URI network-uriBlank URIAuth. network-uri&Turn a string containing a URI into a  . Returns UÙ 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. network-uriParse a URI reference to a  value. Returns Uï if the string is not a valid URI reference. (an absolute or relative URI with optional fragment identifier). network-uriParse a relative URI to a  value. Returns Uá if the string is not a valid relative URI. (a relative URI with optional fragment identifier). network-uriParse an absolute URI to a  value. Returns UÞ if the string is not a valid absolute URI. (an absolute URI without a fragment identifier). network-uriÚTest if string contains a valid URI (an absolute URI with optional fragment identifier). network-uriðTest if string contains a valid URI reference (an absolute or relative URI with optional fragment identifier). network-uriâTest if string contains a valid relative URI (a relative URI with optional fragment identifier). network-urißTest if string contains a valid absolute URI (an absolute URI without a fragment identifier). network-uri,Test if string contains a valid IPv6 address network-uri,Test if string contains a valid IPv4 address network-uriReturns V  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. network-uriReturns V× 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). network-uriTurn 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.  network-uriReturns V& if the character is allowed in a URI.! network-uriReturns V0 if the character is allowed unescaped in a URI.×escapeURIString isUnescapedInURI "http://haskell.org:80?some_param=true&other_param=ב "À"http://haskell.org:80?some_param=true&other_param=%D1%97%D2%91"" network-uriReturns V: if the character is allowed unescaped in a URI component.àescapeURIString isUnescapedInURIComponent "http://haskell.org:80?some_param=true&other_param=ב "Ð"http%3A%2F%2Fhaskell.org%3A80%3Fsome_param%3Dtrue%26other_param%3D%D1%97%D2%91"# network-uriêEscape character if supplied predicate is not satisfied, otherwise return character as singleton string.$ network-uri4Can be used to make a string valid for use in a URI.% network-uri×Turns all instances of escaped characters in the string back into literal characters.& network-uriReturns 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' network-uriReturns a new ) which represents the value of the first ( interpreted as relative to the second .'Algorithm from RFC3986 [3], section 5.2W network-uri2The segments of the path component of a URI. E.g.,( network-uriÃReturns the segments of the path component. E.g., pathSegments  $ parseURI " http://example.org/foo/bar/baz" == ["foo", "bar", "baz"]X network-uri:Split last (name) segment from path, returning (path,name)) network-uriReturns a new 7 which represents the relative location of the first  with respect to the second ñ. 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)Y network-uriÃCalculate the path to the first argument, from the second argument.* network-uriæCase normalization; cf. RFC3986 section 6.2.2.1 NOTE: authority case normalization is not performed+ network-uri3Encoding normalization; cf. RFC3986 section 6.2.2.2, network-uri7Path segment normalization; cf. RFC3986 section 6.2.2.3$ network-uria predicate which returns Z& if the character should be escaped network-urithe string to process network-urithe resulting URI string6  !"#$%&'()*+,-./0123456  '&) !"#$%(*+,-./012345Safe6;×ÜÛDEFGHIJKDEFGHIJKSafe%&(6;"nL network-uriL“ parses a specified string at compile time and return an expression representing the URI when it's a valid URI. Otherwise, it emits an error.&$$(staticURI "http://www.google.com/")http://www.google.com/($$(staticURI "http://www.google.com/##")...)... Invalid URI: http://www.google.com/##...M network-uriM+ parses a specified string at compile time.The typed template haskell L! is available only with GHC-7.8+.N network-uriN is a quasi quoter for L.[uri|http://www.google.com/|]http://www.google.com/[uri|http://www.google.com/##|]...)... Invalid URI: http://www.google.com/##...O network-uriO¢ parses a specified string at compile time and return an expression representing the URI when it's a valid relative reference. Otherwise, it emits an error./$$(staticRelativeReference "/foo?bar=baz#quux")/foo?bar=baz#quux4$$(staticRelativeReference "http://www.google.com/")...6... Invalid relative reference: http://www.google.com/...P network-uriP¢ parses a specified string at compile time and return an expression representing the URI when it's a valid relative reference. Otherwise, it emits an error.The typed template haskell O! is available only with GHC-7.8+.Q network-uriQ is a quasi quoter for O.&[relativeReference|/foo?bar=baz#quux|]/foo?bar=baz#quux+[relativeReference|http://www.google.com/|]...6... Invalid relative reference: http://www.google.com/...L network-uriString representation of a URI network-uriURIM network-uriString representation of a URI network-uriURIO network-uri$String representation of a reference network-uri RefererenceP network-uri$String representation of a reference network-uri RefererenceLMNOPQNLMQOPÛ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_Z[`á*network-uri-2.6.4.2-HOWkOsJ6iQ9LdZ2sAMVHdr Network.URINetwork.URI.LensNetwork.URI.StaticURIAuth uriUserInfo uriRegNameuriPortURI uriScheme uriAuthorityuriPathuriQuery uriFragment rectifyAuthrectifynullURI nullURIAuthparseURIparseURIReferenceparseRelativeReferenceparseAbsoluteURIisURIisURIReferenceisRelativeReference isAbsoluteURI isIPv6address isIPv4address uriIsAbsolute uriIsRelative isReserved isUnreserved uriToStringuriAuthToStringisAllowedInURIisUnescapedInURIisUnescapedInURIComponent escapeURICharescapeURIStringunEscapeStringnonStrictRelativeTo relativeTo pathSegments relativeFrom normalizeCasenormalizeEscapenormalizePathSegmentsparseabsoluteURI escapeStringreserved unreservedscheme authoritypathqueryfragment$fNFDataURIAuth $fShowURI $fNFDataURI$fEqURI$fOrdURI $fDataURI $fGenericURI $fEqURIAuth $fOrdURIAuth $fShowURIAuth $fDataURIAuth$fGenericURIAuth$fLiftBoxedRepURIAuth$fLiftBoxedRepURIuriRegNameLensuriUserInfoLens uriPortLensuriAuthorityLens uriSchemeLens uriPathLens uriQueryLensuriFragmentLens staticURI staticURI'uristaticRelativeReferencestaticRelativeReference'relativeReference ensurePrefix ensureSuffix unlessEmptybase GHC.MaybeNothingghc-prim GHC.TypesTruesegments splitLast relPathFromFalse