Z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     portable provisional Graham Klyne <gk@ninebynine.org>$&Type for authority value within a URI   anonymous@ www.haskell.org :429Represents a general universal resource identifier using  its component parts. For example, for the URI  5 foo://anonymous@www.haskell.org:42/ghc?query#frag the components are:  foo: // anonymous@www.haskell.org:42 /ghc ?query #frag  Blank URI &Turn a string containing a URI into a .  Returns # if the string is not a valid URI; 7 (an absolute URI with optional fragment identifier). 7NOTE: this is different from the previous network.URI,  whose parseURI function works like   in this module. Parse a URI reference to a  value.  Returns - if the string is not a valid URI reference. C (an absolute or relative URI with optional fragment identifier). Parse a relative URI to a  value.  Returns , if the string is not a valid relative URI. 6 (a relative URI with optional fragment identifier). Parse an absolute URI to a  value.  Returns , if the string is not a valid absolute URI. 3 (an absolute URI without a fragment identifier). $Test if string contains a valid URI 7 (an absolute URI with optional fragment identifier). .Test if string contains a valid URI reference C (an absolute or relative URI with optional fragment identifier). -Test if string contains a valid relative URI 6 (a relative URI with optional fragment identifier). -Test if string contains a valid absolute URI 3 (an absolute URI without a fragment identifier). -Test if string contains a valid IPv6 address -Test if string contains a valid IPv4 address 5Test function: parse and reconstruct a URI reference Returns   if the character is a "reserved" character in a F URI. To include a literal instance of one of these characters in a * component of a URI, it must be escaped. Returns   if the character is an " unreserved" character in D a URI. These characters do not need to be escaped in a URI. The . only characters allowed in a URI are either "reserved",  " unreserved", or an escape sequence (% followed by two hex digits). Turn a  into a string. >Uses a supplied function to map the userinfo part of the URI. AThe Show instance for URI uses a mapping that hides any password C that may be present in the URI. Use this function with argument id 4 to preserve the password in the formatted output. Returns  ' if the character is allowed in a URI. Returns  1 if the character is allowed unescaped in a URI. 9Escape character if supplied predicate is not satisfied, 2 otherwise return character as singleton string. 5Can be used to make a string valid for use in a URI. =Turns all instances of escaped characters in the string back  into literal characters. Returns a new # which represents the value of the  first ' interpreted as relative to the second .  For example:  = "foo" `relativeTo` "http://bar.org/" = "http://bar.org/foo" K "http:foo" `nonStrictRelativeTo` "http://bar.org/" = "http://bar.org/foo" Algorithm from RFC3986 [3], section 5.2.2 Compute an absolute  for a supplied URI  relative to a given base. !Returns a new + which represents the relative location of  the first  with respect to the second  . Thus, the C values supplied are expected to be absolute URIs, and the result " returned may be a relative URI.  Example:  + "http://example.com/Root/sub1/name2#frag" < `relativeFrom` "http://example.com/Root/sub2/name2#frag"  == "../sub1/name2#frag" <There is no single correct implementation of this function, @ but any acceptable implementation must satisfy the following:  8 (uabs `relativeFrom` ubase) `relativeTo` ubase == uabs For any valid absolute URI.  (cf.  9http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html   9http://lists.w3.org/Archives/Public/uri/2003Jan/0005.html) "0Case normalization; cf. RFC3986 section 6.2.2.1 7 NOTE: authority case normalization is not performed #4Encoding normalization; cf. RFC3986 section 6.2.2.2 $8Path segment normalization; cf. RFC3986 section 6.2.2.4 .  !"#$%&'()*+,-.   !"#$%&'()*+,-.   !"#$%&'()*+,-portable provisionallibraries@haskell.org .>This data type might have different constructors depending on , what is supported by the operating system. S:Computes the storage requirements (in bytes) of the given  I. This function differs from   # in that the value of the argument is used. T<Computes the storage requirements (in bytes) required for a  I with the given .. UUse a I* with a function requiring a pointer to a  I and the length of that I. V Create a new I% for use with a function requiring a  pointer to a I and the length of that I. WWrite the given I to the given memory location. XRead a I! from the given memory location. Y Throw an  . corresponding to the current socket error if # the IO action returns a result of -1, but retries in case of an D interrupted operation. Checks for operations that would block and > executes an alternative action before retrying in that case. Z Throw an  . corresponding to the current socket error if # the IO action returns a result of -1, but retries in case of an  interrupted operation. [ Throw an  . corresponding to the current socket error if # the IO action returns a result of -1. Discards the result of the ! IO action after error handling. \ Throw an  , corresponding to the current socket error. ]AOn Windows operating systems, the networking subsystem has to be initialised using ]& before any networking operations can be used. eg.  ! main = withSocketsDo $ do {...} EAlthough this is only strictly necessary on Windows platforms, it is Gharmless on other platforms, so for portability it is good practice to use it all the time. Zero a structure. 0./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]0RQNMOPILKJXWSTUV.HGFEDCBA@?>=<;:9876543210/\[ZY]0.HGFEDCBA@?>=<;:9876543210//0123456789:;<=>?@ABCDEFGHILKJJKLMNOPPQRSTUVWXYZ[\]portable provisionallibraries@haskell.orgl-Flags that control the querying behaviour of . xSocket Types. FThis data type might have different constructors depending on what is $ supported by the operating system. 2This is the default protocol for a given service. ANOTE: blocking on Windows unless you compile with -threaded (see  GHC ticket #1129) ANOTE: blocking on Windows unless you compile with -threaded (see  GHC ticket #1129) 7Returns the processID, userID and groupID of the socket's peer. HOnly available on platforms that support SO_PEERCRED on domain sockets. The IPv4 wild card address. The IPv6 wild card address. Closes a socket turns a Socket into an   . By default, the new handle is  unbuffered. Use   to change the buffering. Note that since a  ( is automatically closed by a finalizer B when it is no longer referenced, you should avoid doing any more  operations on the  after calling . To  close the  after , call    on the  . BPack a list of values into a bitmask. The possible mappings from A value to bit-to-set are given as the first argument. We assume F that each value can cause exactly one bit to be set; unpackBits will % break if this property is not true. (Unpack a bitmask into a list of values. Indicate whether the given l will have any effect on  this system. &Default hints for address lookup with . The values  of the j and k fields are  ,  and are never inspected by . 9Resolve a host or service name to one or more addresses.  The ed+ values that this function returns contain I & values that you can pass directly to  or  . DThis function is protocol independent. It can return both IPv4 and  IPv6 address information. The ed3 argument specifies the preferred query behaviour, C socket options, or protocol. You can override these conveniently  using Haskell's record update syntax on , for example  as follows:   D myHints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_CANONNAME] }  Values for f) control query behaviour. The supported  flags are as follows:   AI_PASSIVE If no  value is provided, the network  address in each I  will be left as a  wild card, i.e. as either   or /. This is useful for server applications that . will accept connections from any client.  AI_CANONNAME The k field of the first returned  ed will contain the canonical name of the host. AI_NUMERICHOST The  argument must be a numeric B address in string form, and network name lookups will not be  attempted. Note>: Although the following flags are required by RFC 3493, they A may not have an effect on all platforms, because the underlying E network stack may not support them. To see whether a flag from the ' list below will have any effect, call .  AI_NUMERICSERV The  argument must be a port A number in string form, and service name lookups will not be  attempted.  AI_ADDRCONFIG The list of returned ed values will B only contain IPv4 addresses if the local system has at least ; one IPv4 interface configured, and likewise for IPv6.  AI_V4MAPPED- If an IPv6 lookup is performed, and no IPv6 = addresses are found, IPv6-mapped IPv4 addresses will be  returned. AI_ALL If r, is specified, return all matching IPv6 and : IPv4 addresses. Otherwise, this flag has no effect. You must provide a  value for at least one of the   or  arguments.  can be either a numeric @ network address (dotted quad for IPv4, colon-separated hex for A IPv6) or a hostname. In the latter case, its addresses will be  looked up unless p! is specified as a hint. If you  do not provide a  value and do not set n as E a hint, network addresses in the result will contain the address of  the loopback interface. DIf the query fails, this function throws an IO exception instead of B returning an empty list. Otherwise, it returns a non-empty list  of ed values. >There are several reasons why a query might result in several D values. For example, the queried-for host could be multihomed, or 7 the service might be available via several protocols. CNote: the order of arguments is slightly different to that defined  for  getaddrinfo in RFC 2553. The ed parameter comes first % to make partial application easier.  Example:   F let hints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_CANONNAME] }  addrs <!- getAddrInfo (Just hints) (Just www.haskell.org) (Just http)  let addr = head addrs  sock <E- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) # connect sock (addrAddress addr)   .Resolve an address to a host or service name. ( This function is protocol independent.  The list of ^' values controls query behaviour. The ! supported flags are as follows:   NI_NOFQDN% If a host is local, return only the  hostname part of the FQDN. NI_NUMERICHOST The name of the host is not > looked up. Instead, a numeric representation of the host's ? address is returned. For an IPv4 address, this will be a ? dotted-quad string. For IPv6, it will be colon-separated  hexadecimal. NI_NUMERICSERV The name of the service is not : looked up. Instead, a numeric representation of the  service is returned.  NI_NAMEREQD2 If the hostname cannot be looked up, an IO error  is thrown. NI_DGRAM1 Resolve a datagram-based service name. This is B required only for the few protocols that have different port > numbers for their datagram-based versions than for their  stream-based versions. =Hostname and service name lookups can be expensive. You can . specify which lookups to perform via the two   arguments. If  one of these is  *, the corresponding value in the returned  tuple will be #, and no lookup will be performed. If a host or service'-s name cannot be looked up, then the numeric 2 form of the address or service will be returned. :If the query fails, this function throws an IO exception.  Example:    (hostName, _) <- getNameInfo [] True False myAddress   ./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR[]^_`abcdefghijklmnopqrstuvwxyz{|}~К.HGFEDCBA@?>=<;:9876543210/x~}|{zyILKJRQNMtwvuOPdefghijklsrqponm^cba`_][s^cba`__`abcdefghijkefghijklsrqponmmnopqrstwvuuvwx~}|{zyyz{|}~ non-portable experimentallibraries@haskell.org Get service by name. Get the service given a O and . Get the O corresponding to the .  Resolve a  to IPv4 address. Get a 0 corresponding to the given address and family. - Note that only IPv4 is currently supported. 8Open the network name database. The parameter specifies 9 whether a connection is maintained open between various  networkEntry calls 3Close the connection to the network name database. !Get the list of network entries. CCalling getHostName returns the standard host name for the current ! processor, as set at boot time. ;O;O6portable provisionallibraries@haskell.org Calling  ' creates a client side socket which is H connected to the given host and port. The Protocol and socket type is D derived from the given port identifier. If a port number is given . then the result is always an internet family } socket.  ;Creates the server side socket which has been bound to the  specified port. NOTE: To avoid the "Address already in use" C problems popped up several times on the GHC-Users mailing list we  set the 0 socket option on the listening socket. If you  don'2t want this behaviour, please use the lower level   instead.  +Accept a connection on a socket created by   . Normal  I/O operations (see  System.IO) can be used on the   * returned to communicate with the client. A Notice that although you can pass any Socket to Network.accept, @ only sockets of either AF_UNIX, AF_INET, or AF_INET6 will work  (this shouldn'6t be a problem, though). When using AF_UNIX, HostName = will be set to the path of the socket and PortNumber to -1.  Returns the ! associated with a given socket. O]       O]             !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoppqrstuvwxyz{|}~     [   !" # $%network-2.2.1.3 Network.URINetwork.Socket.InternalNetwork.Socket Network.BSDNetworkbase Data.Maybeghc-primGHC.BoolForeign.StorableSystem.IO.Error System.IOPreludeURIAuth uriUserInfo uriRegNameuriPortURI uriScheme uriAuthorityuriPathuriQuery uriFragmentnullURIparseURIparseURIReferenceparseRelativeReferenceparseAbsoluteURIisURIisURIReferenceisRelativeReference isAbsoluteURI isIPv6address isIPv4address isReserved isUnreserved uriToStringisAllowedInURIisUnescapedInURI escapeURICharescapeURIStringunEscapeStringnonStrictRelativeTo relativeTo relativeFrom normalizeCasenormalizeEscapenormalizePathSegmentsparseabsoluteURI escapeStringreserved unreservedscheme authoritypathqueryfragmentFamily AF_BLUETOOTH AF_WANPIPEAF_PPPOXAF_IRDA AF_ATMSVC AF_ECONETAF_ASH AF_PACKET AF_SECURITY AF_NETBEUIAF_ROSE AF_ATMPVC AF_BRIDGE AF_NETROMAF_ISDNAF_IPXAF_AX25AF_X25AF_ROUTE AF_APPLETALK AF_DECnetAF_SNAAF_INET6AF_INETAF_UNIX AF_UNSPECSockAddr SockAddrUnix SockAddrInet6 SockAddrInetScopeIDFlowInfo PortNumberPortNum HostAddress6 HostAddresssizeOfSockAddrsizeOfSockAddrByFamily withSockAddrwithNewSockAddr pokeSockAddr peekSockAddr%throwSocketErrorIfMinus1RetryMayBlockthrowSocketErrorIfMinus1RetrythrowSocketErrorIfMinus1_throwSocketError withSocketsDo NameInfoFlagNI_NUMERICSERVNI_NUMERICHOST NI_NOFQDN NI_NAMEREQDNI_DGRAMAddrInfo addrFlags addrFamilyaddrSocketType addrProtocol addrAddress addrCanonName AddrInfoFlag AI_V4MAPPED AI_PASSIVEAI_NUMERICSERVAI_NUMERICHOST AI_CANONNAMEAI_ALL AI_ADDRCONFIG ShutdownCmd ShutdownBoth ShutdownSendShutdownReceive SocketType SeqPacketRDMRawDatagramStream NoSocketType SocketOption SendTimeOut RecvTimeOut SendLowWater RecvLowWaterLingerNoDelay MaxSegment TimeToLive OOBInline KeepAlive RecvBuffer SendBuffer Broadcast DontRouteSoErrorType ReuseAddrDebugDummySocketOption__ProtocolNumberSocketMkSocket SocketStatusClosedConvertedToHandle Connected ListeningBound NotConnected ServiceNameHostNamemkSocketfdSocketdefaultProtocolsocket socketPair bindSocketconnectlistenacceptsendTo sendBufTorecvFrom recvBufFromsendrecvrecvLen socketPort getPeerName getSocketNamesetSocketOptiongetSocketOption getPeerCredsendFdrecvFd sendAncillary recvAncillary packFamily unpackFamilypackSocketTypeaNY_PORT iNADDR_ANY iN6ADDR_ANY sOMAXCONN sOL_SOCKET sCM_RIGHTSmaxListenQueueshutdownsClose sIsConnectedsIsBound sIsListening sIsReadable sIsWritable inet_addr inet_ntoasocketToHandleaddrInfoFlagImplemented defaultHints getAddrInfo getNameInfo NetworkEntry networkNamenetworkAliases networkFamilynetworkAddress NetworkName NetworkAddr HostEntryhostName hostAliases hostFamily hostAddresses ProtocolEntry protoName protoAliases protoNumber ServiceEntry serviceNameserviceAliases servicePortserviceProtocol ProtocolNamegetServiceByNamegetServiceByPortgetServicePortNumbergetServiceEntrysetServiceEntryendServiceEntrygetServiceEntriesgetProtocolByNamegetProtocolByNumbergetProtocolNumbergetProtocolEntrysetProtocolEntryendProtocolEntrygetProtocolEntries hostAddress getHostByName getHostByAddr getHostEntry setHostEntry endHostEntrygetHostEntriesgetNetworkByNamegetNetworkByAddrgetNetworkEntrysetNetworkEntryendNetworkEntrygetNetworkEntries getHostNamePortID UnixSocketService connectTolistenOnNothingtestURIReferenceTruesizeOf GHC.IOBaseIOError zeroMemoryHandle GHC.Handle hSetBufferinghClosepackBits unpackBitsGHC.Err undefinedJustBoolFalse