-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Library for working with URIs
--   
--   Library for working with URIs, including parsing, rendering, merging,
--   escaping
@package uri
@version 0.1.6.5

module Text.URI

-- | Represents a general universal resource identifier using its component
--   parts.
--   
--   For example, for the URI
--   
--   <pre>
--   foo://anonymous@www.haskell.org:42/ghc?query#frag
--   </pre>
--   
--   the components are:
data URI
URI :: Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> String -> Maybe String -> Maybe String -> URI

-- | <pre>
--   foo
--   </pre>
[uriScheme] :: URI -> Maybe String

-- | <pre>
--   anonymous
--   </pre>
[uriUserInfo] :: URI -> Maybe String

-- | <pre>
--   www.haskell.org
--   </pre>
[uriRegName] :: URI -> Maybe String

-- | <pre>
--   42
--   </pre>
[uriPort] :: URI -> Maybe Integer

-- | <pre>
--   /ghc
--   </pre>
[uriPath] :: URI -> String

-- | <pre>
--   query
--   </pre>
[uriQuery] :: URI -> Maybe String

-- | <pre>
--   frag
--   </pre>
[uriFragment] :: URI -> Maybe String

-- | Removes ".." and "." from path
dereferencePath :: [String] -> [String]

-- | dereferencePath for strings
dereferencePathString :: String -> String

-- | Escapes string, using predicate to determine whether character is
--   allowed
escapeString :: (Char -> Bool) -> String -> String

-- | Checks if uri is a reference
isReference :: URI -> Bool

-- | Checks if uri is relative
isRelative :: URI -> Bool

-- | Blank URI
nullURI :: URI

-- | Checks if character is OK in fragment
okInFragment :: Char -> Bool

-- | Checks if character is OK in path
okInPath :: Char -> Bool

-- | Checks if character is ok in path segment
okInPathSegment :: Char -> Bool

-- | Checks if character is OK in query
okInQuery :: Char -> Bool

-- | Checks if character is OK in urlencoded query item
okInQueryItem :: Char -> Bool

-- | Checks if character is OK in userinfo
okInUserinfo :: Char -> Bool

-- | Merges two paths
mergePaths :: [String] -> [String] -> [String]

-- | mergePaths for strings
mergePathStrings :: String -> String -> String

-- | Merges two URIs
mergeURIs :: URI -> URI -> URI

-- | mergeURIs for strings
mergeURIStrings :: String -> String -> String

-- | Composes www-urlencoded query from key-value pairs
pairsToQuery :: [(String, String)] -> String

-- | Parses URI
parseURI :: String -> Maybe URI

-- | Splits path to segments
pathToSegments :: String -> [String]

-- | Joins path segments, with escaping
segmentsToPath :: [String] -> String

-- | Parses www-urlencoded string to key-value pairs
queryToPairs :: String -> [(String, String)]

-- | Unescapes percent-sequences
unescapeString :: String -> String

-- | Convenience function for extracting path segments
uriPathSegments :: URI -> [String]

-- | Convenience function for extracting www-urlencoded data
uriQueryItems :: URI -> [(String, String)]
instance GHC.Internal.Data.Data.Data Text.URI.URI
instance GHC.Classes.Eq Text.URI.URI
instance GHC.Classes.Ord Text.URI.URI
instance GHC.Internal.Show.Show Text.URI.URI
