Hoogle Search
Within LTS Haskell 24.12 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
lookupTXT :: Resolver -> Domain -> IO (Either DNSError [ByteString])dns Network.DNS.Lookup Look up all 'TXT' records for the given hostname. The results are free-form ByteStrings. Two common uses for 'TXT' records are http://en.wikipedia.org/wiki/Sender_Policy_Framework and http://en.wikipedia.org/wiki/DomainKeys_Identified_Mail. As an example, we find the SPF record for "mew.org":
>>> rs <- makeResolvSeed defaultResolvConf >>> withResolver rs $ \resolver -> lookupTXT resolver "mew.org" Right ["v=spf1 +mx -all"]
lookupAuth :: Resolver -> Domain -> TYPE -> IO (Either DNSError [RData])dns Network.DNS.LookupRaw Look up resource records of a specified type for a domain, collecting the results from the AUTHORITY section of the response. See the documentation of lookupRaw to understand the concrete behavior. Cache is used even if resolvCache is Just.
lookupRaw :: Resolver -> Domain -> TYPE -> IO (Either DNSError DNSMessage)dns Network.DNS.LookupRaw Look up a name and return the entire DNS Response. For a given DNS server, the queries are done:
- A new UDP socket bound to a new local port is created and a new identifier is created atomically from the cryptographically secure pseudo random number generator for the target DNS server. Then UDP queries are tried with the limitation of resolvRetry (use EDNS if specifiecd). If it appears that the target DNS server does not support EDNS, it falls back to traditional queries.
- If the response is truncated, a new TCP socket bound to a new local port is created. Then exactly one TCP query is retried.
- In sequential lookup (resolvConcurrent is False), the query procedure above is processed in the order of the DNS servers sequentially until a successful response is received.
- In concurrent lookup (resolvConcurrent is True), the query procedure above is processed for each DNS server concurrently. The first received response is accepted even if it is an error.
rs <- makeResolvSeed defaultResolvConf withResolver rs $ \resolver -> lookupRaw resolver "www.example.com" A
And the (formatted) expected output:Right (DNSMessage { header = DNSHeader { identifier = 1, flags = DNSFlags { qOrR = QR_Response, opcode = OP_STD, authAnswer = False, trunCation = False, recDesired = True, recAvailable = True, rcode = NoErr, authenData = False }, }, question = [Question { qname = "www.example.com.", qtype = A}], answer = [ResourceRecord {rrname = "www.example.com.", rrtype = A, rrttl = 800, rdlen = 4, rdata = 93.184.216.119}], authority = [], additional = []})
AXFR requests cannot be performed with this interface.>>> rs <- makeResolvSeed defaultResolvConf >>> withResolver rs $ \resolver -> lookupRaw resolver "mew.org" AXFR Left InvalidAXFRLookup
lookupRawCtl :: Resolver -> Domain -> TYPE -> QueryControls -> IO (Either DNSError DNSMessage)dns Network.DNS.LookupRaw Similar to lookupRaw, but the default values of the RD, AD, CD and DO flag bits, as well as various EDNS features, can be adjusted via the QueryControls parameter.
-
dns Network.DNS.LookupRaw Similar to lookupRawCtl, but the recv action can be replaced with something other than receive. For example, in an environment where frequent retrieval of the current time is a performance issue, you can pass the time from outside instead of having receive retrieve the current time.
lookupStack :: MonadIO m => Int -> m (Maybe [(String, SrcLoc)])ghcjs-dom GHCJS.DOM.Debug.Internal No documentation available.
lookupJust :: (Eq a, Partial) => a -> [(a, b)] -> bhledger Hledger.Cli.Script lookupJust key = fromJust . lookup key
lookupJustDef :: Eq a => b -> a -> [(a, b)] -> bhledger Hledger.Cli.Script No documentation available.
lookupJustNote :: (Partial, Eq a) => String -> a -> [(a, b)] -> bhledger Hledger.Cli.Script No documentation available.
lookupHeader :: Headers -> ByteString -> Maybe ByteStringhttp-common Network.Http.Types No documentation available.