Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
type family
Lookup (a1 :: a) (a2 :: [(a, b)]) :: Maybe bsingletons-base Data.List.Singletons No documentation available.
type family
Lookup (a1 :: a) (a2 :: [(a, b)]) :: Maybe bsingletons-base Prelude.Singletons No documentation available.
class
Lookup (f :: Type -> Type)keys Data.Key No documentation available.
-
Simple, high-level DNS lookup functions for clients. All of the lookup functions necessary run in IO since they interact with the network. The return types are similar, but differ in what can be returned from a successful lookup. We can think of the return type as either "what I asked for" or "an error". For example, the lookupA function, if successful, will return a list of IPv4. The lookupMX function will instead return a list of (Domain,Int) pairs, where each pair represents a hostname and its associated priority. The order of multiple results may not be consistent between lookups. If you require consistent results, apply sort to the returned list. The errors that can occur are the same for all lookups. Namely:
- Timeout
- Wrong sequence number (foul play?)
- Unexpected data in the response
>>> let hostname = Data.ByteString.Char8.pack "www.example.com" >>> >>> rs <- makeResolvSeed defaultResolvConf >>> withResolver rs $ \resolver -> lookupA resolver hostname Right [93.184.216.34]
The only error that we can easily cause is a timeout. We do this by creating and utilizing a ResolvConf which has a timeout of one millisecond and a very limited number of retries:>>> let hostname2 = Data.ByteString.Char8.pack "www.example.com" >>> let badrc = defaultResolvConf { resolvTimeout = 0, resolvRetry = 1 } >>> >>> rs2 <- makeResolvSeed badrc >>> withResolver rs2 $ \resolver -> lookupA resolver hostname2 Left RetryLimitExceeded
As is the convention, successful results will always be wrapped in a Right while errors will be wrapped in a Left. For convenience, you may wish to enable GHC's OverloadedStrings extension. This will allow you to avoid calling pack on each domain name. See https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#overloaded-string-literals for more information. In the following examples, we assuem this extension is enabled. All lookup functions eventually call lookupRaw. See its documentation to understand the concrete lookup behavior. module Language.Haskell.GHC.ExactPrint.
Lookup No documentation available.
type
Lookup a = Either [Error] aliquidhaskell-boot Language.Haskell.Liquid.Bare.Resolve No documentation available.
type family
Lookup dim (lcsu :: LCSU Type)units Data.Metrology No documentation available.
type family
Lookup dim (lcsu :: LCSU Type)units Data.Metrology.Internal No documentation available.
Lookup :: Exp -> MemberId -> ExpAgda Agda.Compiler.JS.Syntax No documentation available.
module Data.PerfectHash.
Lookup Note that what is referred to as a "nonce" in this library may be better known as a "salt".