5.4. URI

The URI library provides utilities for parsing and manipulating Uniform Resource Identifiers (a more general form of Uniform Resource Locators, or URLs). URIs are described in RFC 2396.

module URI where 

data URI {
  scheme,	:: String,
  authority,	:: String,
  path,		:: String,
  query,	:: String,
  fragment	:: String
  }
instance Show URI

parseURI        :: String -> Maybe URI
	
relativeTo      :: URI -> URI -> Maybe URI

-- support for putting strings into URI-friendly
-- escaped format and getting them back again.
-- Can't be done transparently, because certain characters
-- have different meanings in different kinds of URI.

reserved 	:: Char -> Bool
unreserved 	:: Char -> Bool
isAllowedInURI	:: Char -> Bool
escapeString    :: String -> (Char->Bool) -> String
unEscapeString	:: String -> String