Module

URI.Authority

#Authority

data Authority userInfo hosts

The authority part of a URI. For example: purescript.org, localhost:3000, user@example.net.

Constructors

Instances

#AuthorityOptions

type AuthorityOptions :: Type -> Type -> Row Typetype AuthorityOptions userInfo hosts = AuthorityParseOptions userInfo hosts (AuthorityPrintOptions userInfo hosts ())

A row type for describing the options fields used by the authority parser and printer.

Used as Record (AuthorityOptions userInfo hosts) when type annotating an options record.

#AuthorityParseOptions

type AuthorityParseOptions :: Type -> Type -> Row Type -> Row Typetype AuthorityParseOptions userInfo hosts r = (parseHosts :: Parser String hosts, parseUserInfo :: UserInfo -> Either URIPartParseError userInfo | r)

A row type for describing the options fields used by the authority parser.

Used as Record (AuthorityParseOptions userInfo hosts ()) when type annotating an options record.

#AuthorityPrintOptions

type AuthorityPrintOptions :: Type -> Type -> Row Type -> Row Typetype AuthorityPrintOptions userInfo hosts r = (printHosts :: hosts -> String, printUserInfo :: userInfo -> UserInfo | r)

A row type for describing the options fields used by the authority printer.

Used as Record (AuthorityPrintOptions userInfo hosts ()) when type annotating an options record.

#parser

parser :: forall userInfo hosts r. Record (AuthorityParseOptions userInfo hosts r) -> Parser String (Authority userInfo hosts)

A parser for the authority part of a URI. Expects values with a "//" prefix.

#print

print :: forall userInfo hosts r. Record (AuthorityPrintOptions userInfo hosts r) -> Authority userInfo hosts -> String

A printer for the authority part of a URI. Will print the value with a "//" prefix.

#_userInfo

_userInfo :: forall userInfo hosts. Lens' (Authority userInfo hosts) (Maybe userInfo)

A lens for the user-info component of the authority.

#_hosts

_hosts :: forall userInfo hosts. Lens' (Authority userInfo hosts) hosts

A lens for the host(s) component of the authority.

Re-exports from URI.Host

#RegName

newtype RegName

The reg-name variation of the host part of a URI. A reg-name is probably more commonly referred to as just a host name or domain name (but it is actually a name, rather than an IP address).

Instances

#IPv6Address

newtype IPv6Address

This type and parser are much too forgiving currently, allowing almost anything through that looks vaguely IPv6ish.

Instances

#IPv4Address

data IPv4Address

The IPv4 address variation of the host part of a URI.

Instances

#Host

data Host

A host address. Supports named addresses, IPv4, and IPv6.

Constructors

Instances

#_NameAddress

_NameAddress :: Prism' Host RegName

A prism for the NameAddress constructor.

#_IPv6Address

_IPv6Address :: Prism' Host IPv6Address

A prism for the IPv6Address constructor.

#_IPv4Address

_IPv4Address :: Prism' Host IPv4Address

A prism for the IPv4Address constructor.

Re-exports from URI.Port

#Port

newtype Port

The port component of a host in a URI.

Instances

Re-exports from URI.UserInfo

#UserInfo

newtype UserInfo

The user info part of an Authority. For example: user, foo:bar.

This type treats the entire string as an undifferentiated blob, if you would like to specifically deal with the user:password format, take a look at URI.Extra.UserPassInfo.

Instances

Modules