-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A simple library for parsing and generating URIs
--
-- A simple library for parsing and generating URIs
@package uri-parse
@version 0.1.0.1
-- | A URI parsing library
module LuminescentDreams.Data.URI
-- | Convert Query to ByteString.
renderQuery :: Bool -> Query -> ByteString
-- | Protocol is a basic protocol string, such as "http" or "ftp"
newtype Protocol
Protocol :: Text -> Protocol
[_protocol] :: Protocol -> Text
-- | FQDN is the complete hostname of the server
newtype FQDN
FQDN :: Text -> FQDN
[_fqdn] :: FQDN -> Text
-- | Optional, but Port allows one to specify a non-default port for a URI
newtype Port
Port :: Int -> Port
[_port] :: Port -> Int
-- | The path section of the URI, divided into one element per subdirectory
newtype PathParts
PathParts :: [Text] -> PathParts
[_pathParts] :: PathParts -> [Text]
-- | A straightforward URI data type
--
-- TODO: need to support usernames and passwords as part of the URI, such
-- as postgres:/username:password@localhost:5432my_database
data URI
-- | uriPath treats the path portion of the URI as a single string. This is
-- more common and natural most of the time.
uriPath :: Lens' URI Text
-- | Parse a URI from Text, returning either an error or a complete URI
--
-- TODO: Rebuild these functions for easy ByteString, Text, String
-- parsing and rendering
parseURI :: Text -> Either String URI
-- | Parse a URI from a String, returning either an error or a complete URI
parseURI' :: String -> Either String URI
-- | Render a URI to a ByteString - I chose bytestrings because they are so
-- frequently required in HTTP libraries.
renderURI :: URI -> ByteString
instance GHC.Show.Show LuminescentDreams.Data.URI.URI
instance GHC.Classes.Eq LuminescentDreams.Data.URI.URI
instance GHC.Base.Monoid LuminescentDreams.Data.URI.PathParts
instance GHC.Show.Show LuminescentDreams.Data.URI.PathParts
instance GHC.Classes.Eq LuminescentDreams.Data.URI.PathParts
instance GHC.Num.Num LuminescentDreams.Data.URI.Port
instance GHC.Show.Show LuminescentDreams.Data.URI.Port
instance GHC.Classes.Eq LuminescentDreams.Data.URI.Port
instance Data.String.IsString LuminescentDreams.Data.URI.FQDN
instance GHC.Show.Show LuminescentDreams.Data.URI.FQDN
instance GHC.Classes.Eq LuminescentDreams.Data.URI.FQDN
instance Data.String.IsString LuminescentDreams.Data.URI.Protocol
instance GHC.Show.Show LuminescentDreams.Data.URI.Protocol
instance GHC.Classes.Eq LuminescentDreams.Data.URI.Protocol
instance Data.Default.Class.Default LuminescentDreams.Data.URI.URI