Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1f2b142b9d2ef4849a6f5316fa1c5b12 > files > 2644

ghc-6.10.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Network.URI</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Network-URI.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>network-2.2.1.2: Networking-related facilities</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Network.URI</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>portable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>provisional</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>Graham Klyne &lt;gk@ninebynine.org&gt;</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>The URI type
</A
></DT
><DT
><A HREF="#2"
>Parsing
</A
></DT
><DT
><A HREF="#3"
>Test for strings containing various kinds of URI
</A
></DT
><DT
><A HREF="#4"
>Relative URIs
</A
></DT
><DT
><A HREF="#5"
>Operations on URI strings
</A
></DT
><DT
><A HREF="#6"
>URI Normalization functions
</A
></DT
><DT
><A HREF="#7"
>Deprecated functions
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>This module defines functions for handling URIs.  It presents substantially the
  same interface as the older GHC Network.URI module, but is implemented using
  Parsec rather than a Regex library that is not available with Hugs.  The internal
  representation of URI has been changed so that URI strings are more
  completely preserved when round-tripping to a URI value and back.
</P
><P
>In addition, four methods are provided for parsing different
  kinds of URI string (as noted in RFC3986):
      <TT
><A HREF="Network-URI.html#v%3AparseURI"
>parseURI</A
></TT
>,
      <TT
><A HREF="Network-URI.html#v%3AparseURIReference"
>parseURIReference</A
></TT
>,
      <TT
><A HREF="Network-URI.html#v%3AparseRelativeReference"
>parseRelativeReference</A
></TT
> and
      <TT
><A HREF="Network-URI.html#v%3AparseAbsoluteURI"
>parseAbsoluteURI</A
></TT
>.
</P
><P
>Further, four methods are provided for classifying different
  kinds of URI string (as noted in RFC3986):
      <TT
><A HREF="Network-URI.html#v%3AisURI"
>isURI</A
></TT
>,
      <TT
><A HREF="Network-URI.html#v%3AisURIReference"
>isURIReference</A
></TT
>,
      <TT
><A HREF="Network-URI.html#v%3AisRelativeReference"
>isRelativeReference</A
></TT
> and
      <TT
><A HREF="Network-URI.html#v%3AisAbsoluteURI"
>isAbsoluteURI</A
></TT
>.
</P
><P
>The long-standing official reference for URI handling was RFC2396 [1],
  as updated by RFC 2732 [2], but this was replaced by a new specification,
  RFC3986 [3] in January 2005.  This latter specification has been used
  as the primary reference for constructing the URI parser implemented
  here, and it is intended that there is a direct relationship between
  the syntax definition in that document and this parser implementation.
</P
><P
>RFC 1808 [4] contains a number of test cases for relative URI handling.
  Dan Connolly's Python module <TT
>uripath.py</TT
> [5] also contains useful details
  and test cases.
</P
><P
>Some of the code has been copied from the previous GHC implementation,
  but the parser is replaced with one that performs more complete
  syntax checking of the URI itself, according to RFC3986 [3].
</P
><P
>References
</P
><OL
><LI
> <A HREF="http://www.ietf.org/rfc/rfc2396.txt"
>http://www.ietf.org/rfc/rfc2396.txt</A
>
</LI
><LI
> <A HREF="http://www.ietf.org/rfc/rfc2732.txt"
>http://www.ietf.org/rfc/rfc2732.txt</A
>
</LI
><LI
> <A HREF="http://www.ietf.org/rfc/rfc3986.txt"
>http://www.ietf.org/rfc/rfc3986.txt</A
>
</LI
><LI
> <A HREF="http://www.ietf.org/rfc/rfc1808.txt"
>http://www.ietf.org/rfc/rfc1808.txt</A
>
</LI
><LI
> <A HREF="http://www.w3.org/2000/10/swap/uripath.py"
>http://www.w3.org/2000/10/swap/uripath.py</A
>
</LI
></OL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AURI"
>URI</A
>  = <A HREF="#v%3AURI"
>URI</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriScheme"
>uriScheme</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriAuthority"
>uriAuthority</A
> :: <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURIAuth"
>URIAuth</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriPath"
>uriPath</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriQuery"
>uriQuery</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriFragment"
>uriFragment</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AURIAuth"
>URIAuth</A
>  = <A HREF="#v%3AURIAuth"
>URIAuth</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriUserInfo"
>uriUserInfo</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriRegName"
>uriRegName</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AuriPort"
>uriPort</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnullURI"
>nullURI</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseURI"
>parseURI</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseURIReference"
>parseURIReference</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseRelativeReference"
>parseRelativeReference</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseAbsoluteURI"
>parseAbsoluteURI</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisURI"
>isURI</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisURIReference"
>isURIReference</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisRelativeReference"
>isRelativeReference</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisAbsoluteURI"
>isAbsoluteURI</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisIPv6address"
>isIPv6address</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisIPv4address"
>isIPv4address</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArelativeTo"
>relativeTo</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnonStrictRelativeTo"
>nonStrictRelativeTo</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArelativeFrom"
>relativeFrom</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AuriToString"
>uriToString</A
> :: (<A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
>) -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Text-Show.html#t%3AShowS"
>ShowS</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisReserved"
>isReserved</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisUnreserved"
>isUnreserved</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisAllowedInURI"
>isAllowedInURI</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisUnescapedInURI"
>isUnescapedInURI</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AescapeURIChar"
>escapeURIChar</A
> :: (<A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AescapeURIString"
>escapeURIString</A
> :: (<A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AunEscapeString"
>unEscapeString</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnormalizeCase"
>normalizeCase</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnormalizeEscape"
>normalizeEscape</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnormalizePathSegments"
>normalizePathSegments</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseabsoluteURI"
>parseabsoluteURI</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AescapeString"
>escapeString</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Areserved"
>reserved</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunreserved"
>unreserved</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Ascheme"
>scheme</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aauthority"
>authority</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Apath"
>path</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aquery"
>query</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afragment"
>fragment</A
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>The URI type
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:URI"
><A NAME="t%3AURI"
></A
></A
><B
>URI</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>Represents a general universal resource identifier using
  its component parts.
</P
><P
>For example, for the URI
</P
><PRE
>   foo://anonymous@www.haskell.org:42/ghc?query#frag
</PRE
><P
>the components are:
</P
></TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:URI"
><A NAME="v%3AURI"
></A
></A
><B
>URI</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:uriScheme"
><A NAME="v%3AuriScheme"
></A
></A
><B
>uriScheme</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>foo:</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriAuthority"
><A NAME="v%3AuriAuthority"
></A
></A
><B
>uriAuthority</B
> :: <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURIAuth"
>URIAuth</A
></TD
><TD CLASS="rdoc"
><PRE
>//anonymous@www.haskell.org:42</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriPath"
><A NAME="v%3AuriPath"
></A
></A
><B
>uriPath</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>/ghc</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriQuery"
><A NAME="v%3AuriQuery"
></A
></A
><B
>uriQuery</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>?query</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriFragment"
><A NAME="v%3AuriFragment"
></A
></A
><B
>uriFragment</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>#frag</PRE
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:URI')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:URI" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Data.html#t%3AData"
>Data</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Typeable.html#t%3ATypeable"
>Typeable</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:URIAuth"
><A NAME="t%3AURIAuth"
></A
></A
><B
>URIAuth</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Type for authority value within a URI
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:URIAuth"
><A NAME="v%3AURIAuth"
></A
></A
><B
>URIAuth</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:uriUserInfo"
><A NAME="v%3AuriUserInfo"
></A
></A
><B
>uriUserInfo</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>anonymous@</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriRegName"
><A NAME="v%3AuriRegName"
></A
></A
><B
>uriRegName</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>www.haskell.org</PRE
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:uriPort"
><A NAME="v%3AuriPort"
></A
></A
><B
>uriPort</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
><PRE
>:42</PRE
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:URIAuth')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:URIAuth" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Network-URI.html#t%3AURIAuth"
>URIAuth</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Data.html#t%3AData"
>Data</A
> <A HREF="Network-URI.html#t%3AURIAuth"
>URIAuth</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Typeable.html#t%3ATypeable"
>Typeable</A
> <A HREF="Network-URI.html#t%3AURIAuth"
>URIAuth</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:nullURI"
><A NAME="v%3AnullURI"
></A
></A
><B
>nullURI</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
>Blank URI
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="2"
><A NAME="2"
>Parsing
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseURI"
><A NAME="v%3AparseURI"
></A
></A
><B
>parseURI</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Turn a string containing a URI into a <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
>.
  Returns <TT
><A HREF="../base/Data-Maybe.html#v%3ANothing"
>Nothing</A
></TT
> if the string is not a valid URI;
  (an absolute URI with optional fragment identifier).
</P
><P
>NOTE: this is different from the previous network.URI,
  whose <TT
>parseURI</TT
> function works like <TT
><A HREF="Network-URI.html#v%3AparseURIReference"
>parseURIReference</A
></TT
>
  in this module.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseURIReference"
><A NAME="v%3AparseURIReference"
></A
></A
><B
>parseURIReference</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
>Parse a URI reference to a <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> value.
  Returns <TT
><A HREF="../base/Data-Maybe.html#v%3ANothing"
>Nothing</A
></TT
> if the string is not a valid URI reference.
  (an absolute or relative URI with optional fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseRelativeReference"
><A NAME="v%3AparseRelativeReference"
></A
></A
><B
>parseRelativeReference</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
>Parse a relative URI to a <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> value.
  Returns <TT
><A HREF="../base/Data-Maybe.html#v%3ANothing"
>Nothing</A
></TT
> if the string is not a valid relative URI.
  (a relative URI with optional fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseAbsoluteURI"
><A NAME="v%3AparseAbsoluteURI"
></A
></A
><B
>parseAbsoluteURI</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
>Parse an absolute URI to a <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> value.
  Returns <TT
><A HREF="../base/Data-Maybe.html#v%3ANothing"
>Nothing</A
></TT
> if the string is not a valid absolute URI.
  (an absolute URI without a fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="3"
><A NAME="3"
>Test for strings containing various kinds of URI
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isURI"
><A NAME="v%3AisURI"
></A
></A
><B
>isURI</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid URI
  (an absolute URI with optional fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isURIReference"
><A NAME="v%3AisURIReference"
></A
></A
><B
>isURIReference</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid URI reference
  (an absolute or relative URI with optional fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isRelativeReference"
><A NAME="v%3AisRelativeReference"
></A
></A
><B
>isRelativeReference</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid relative URI
  (a relative URI with optional fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isAbsoluteURI"
><A NAME="v%3AisAbsoluteURI"
></A
></A
><B
>isAbsoluteURI</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid absolute URI
  (an absolute URI without a fragment identifier).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isIPv6address"
><A NAME="v%3AisIPv6address"
></A
></A
><B
>isIPv6address</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid IPv6 address
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isIPv4address"
><A NAME="v%3AisIPv4address"
></A
></A
><B
>isIPv4address</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Test if string contains a valid IPv4 address
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="4"
><A NAME="4"
>Relative URIs
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:relativeTo"
><A NAME="v%3ArelativeTo"
></A
></A
><B
>relativeTo</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
>Compute an absolute <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> for a supplied URI
  relative to a given base.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:nonStrictRelativeTo"
><A NAME="v%3AnonStrictRelativeTo"
></A
></A
><B
>nonStrictRelativeTo</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Returns a new <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> which represents the value of the
  first <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> interpreted as relative to the second <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
>.
  For example:
</P
><PRE
> &quot;foo&quot; `relativeTo` &quot;http://bar.org/&quot; = &quot;http://bar.org/foo&quot;
 &quot;http:foo&quot; `nonStrictRelativeTo` &quot;http://bar.org/&quot; = &quot;http://bar.org/foo&quot;
</PRE
><P
>Algorithm from RFC3986 [3], section 5.2.2
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:relativeFrom"
><A NAME="v%3ArelativeFrom"
></A
></A
><B
>relativeFrom</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Returns a new <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> which represents the relative location of
  the first <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> with respect to the second <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
>.  Thus, the
  values supplied are expected to be absolute URIs, and the result
  returned may be a relative URI.
</P
><P
>Example:
</P
><PRE
> &quot;http://example.com/Root/sub1/name2#frag&quot;
   `relativeFrom` &quot;http://example.com/Root/sub2/name2#frag&quot;
   == &quot;../sub1/name2#frag&quot;
</PRE
><P
>There is no single correct implementation of this function,
  but any acceptable implementation must satisfy the following:
</P
><PRE
> (uabs `relativeFrom` ubase) `relativeTo` ubase == uabs
</PRE
><P
>For any valid absolute URI.
  (cf. <A HREF="http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html"
>http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html</A
>
       <A HREF="http://lists.w3.org/Archives/Public/uri/2003Jan/0005.html"
>http://lists.w3.org/Archives/Public/uri/2003Jan/0005.html</A
>)
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="5"
><A NAME="5"
>Operations on URI strings
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="doc"
>Support for putting strings into URI-friendly
   escaped format and getting them back again.
   This can't be done transparently in all cases, because certain
   characters have different meanings in different kinds of URI.
   The URI spec [3], section 2.4, indicates that all URI components
   should be escaped before they are assembled as a URI:
   &quot;Once produced, a URI is always in its percent-encoded form&quot;
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:uriToString"
><A NAME="v%3AuriToString"
></A
></A
><B
>uriToString</B
> :: (<A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
>) -&gt; <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Text-Show.html#t%3AShowS"
>ShowS</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Turn a <TT
><A HREF="Network-URI.html#t%3AURI"
>URI</A
></TT
> into a string.
</P
><P
>Uses a supplied function to map the userinfo part of the URI.
</P
><P
>The Show instance for URI uses a mapping that hides any password
  that may be present in the URI.  Use this function with argument <TT
>id</TT
>
  to preserve the password in the formatted output.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isReserved"
><A NAME="v%3AisReserved"
></A
></A
><B
>isReserved</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Returns <TT
><A HREF="../ghc-prim/GHC-Bool.html#v%3ATrue"
>True</A
></TT
> if the character is a &quot;reserved&quot; character in a
  URI.  To include a literal instance of one of these characters in a
  component of a URI, it must be escaped.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isUnreserved"
><A NAME="v%3AisUnreserved"
></A
></A
><B
>isUnreserved</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Returns <TT
><A HREF="../ghc-prim/GHC-Bool.html#v%3ATrue"
>True</A
></TT
> if the character is an &quot;unreserved&quot; character in
  a URI.  These characters do not need to be escaped in a URI.  The
  only characters allowed in a URI are either &quot;reserved&quot;,
  &quot;unreserved&quot;, or an escape sequence (<TT
>%</TT
> followed by two hex digits).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isAllowedInURI"
><A NAME="v%3AisAllowedInURI"
></A
></A
><B
>isAllowedInURI</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Returns <TT
><A HREF="../ghc-prim/GHC-Bool.html#v%3ATrue"
>True</A
></TT
> if the character is allowed in a URI.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isUnescapedInURI"
><A NAME="v%3AisUnescapedInURI"
></A
></A
><B
>isUnescapedInURI</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Returns <TT
><A HREF="../ghc-prim/GHC-Bool.html#v%3ATrue"
>True</A
></TT
> if the character is allowed unescaped in a URI.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:escapeURIChar"
><A NAME="v%3AescapeURIChar"
></A
></A
><B
>escapeURIChar</B
> :: (<A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="doc"
>Escape character if supplied predicate is not satisfied,
  otherwise return character as singleton string.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:escapeURIString"
><A NAME="v%3AescapeURIString"
></A
></A
><B
>escapeURIString</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>a predicate which returns <TT
><A HREF="../ghc-prim/GHC-Bool.html#v%3AFalse"
>False</A
></TT
>
   if the character should be escaped
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>the string to process
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
>the resulting URI string
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Can be used to make a string valid for use in a URI.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:unEscapeString"
><A NAME="v%3AunEscapeString"
></A
></A
><B
>unEscapeString</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="doc"
>Turns all instances of escaped characters in the string back
  into literal characters.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="6"
><A NAME="6"
>URI Normalization functions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:normalizeCase"
><A NAME="v%3AnormalizeCase"
></A
></A
><B
>normalizeCase</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="doc"
>Case normalization; cf. RFC3986 section 6.2.2.1
  NOTE:  authority case normalization is not performed
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:normalizeEscape"
><A NAME="v%3AnormalizeEscape"
></A
></A
><B
>normalizeEscape</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="doc"
>Encoding normalization; cf. RFC3986 section 6.2.2.2
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:normalizePathSegments"
><A NAME="v%3AnormalizePathSegments"
></A
></A
><B
>normalizePathSegments</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="doc"
>Path segment normalization; cf. RFC3986 section 6.2.2.4
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="7"
><A NAME="7"
>Deprecated functions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseabsoluteURI"
><A NAME="v%3AparseabsoluteURI"
></A
></A
><B
>parseabsoluteURI</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Network-URI.html#t%3AURI"
>URI</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:escapeString"
><A NAME="v%3AescapeString"
></A
></A
><B
>escapeString</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; (<A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:reserved"
><A NAME="v%3Areserved"
></A
></A
><B
>reserved</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:unreserved"
><A NAME="v%3Aunreserved"
></A
></A
><B
>unreserved</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:scheme"
><A NAME="v%3Ascheme"
></A
></A
><B
>scheme</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:authority"
><A NAME="v%3Aauthority"
></A
></A
><B
>authority</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:path"
><A NAME="v%3Apath"
></A
></A
><B
>path</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:query"
><A NAME="v%3Aquery"
></A
></A
><B
>query</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:fragment"
><A NAME="v%3Afragment"
></A
></A
><B
>fragment</B
> :: <A HREF="Network-URI.html#t%3AURI"
>URI</A
> -&gt; <A HREF="../base/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>