Hoogle Search

Within LTS Haskell 24.65 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. lookup :: Ord k => k -> MonoidalMap k a -> Maybe a

    monoidal-containers Data.Map.Monoidal

    No documentation available.

  2. lookup :: Ord k => k -> MonoidalMap k a -> Maybe a

    monoidal-containers Data.Map.Monoidal.Strict

    No documentation available.

  3. lookup :: Ord k => k -> MultiMap k a -> [a]

    multimap Data.MultiMap

    O(log n). Lookup the value at a key in the map. The function will return the corrsponding values as a List, or the empty list if no values are associated witht the given key.

  4. lookup :: Ord k => k -> SetMap k a -> Set a

    multimap Data.SetMap

    O(log n). Lookup the value at a key in the map. The function will return the corrsponding values as a List, or the empty list if no values are associated witht the given key.

  5. lookup :: Key -> NEIntMap a -> Maybe a

    nonempty-containers Data.IntMap.NonEmpty

    O(log n). Lookup the value at a key in the map. The function will return the corresponding value as (Just value), or Nothing if the key isn't in the map. An example of using lookup:

    import Prelude hiding (lookup)
    import Data.Map.NonEmpty
    
    employeeDept = fromList (("John","Sales") :| [("Bob","IT")])
    deptCountry = fromList (("IT","USA") :| [("Sales","France")])
    countryCurrency = fromList (("USA", "Dollar") :| [("France", "Euro")])
    
    employeeCurrency :: String -> Maybe String
    employeeCurrency name = do
    dept <- lookup name employeeDept
    country <- lookup dept deptCountry
    lookup country countryCurrency
    
    main = do
    putStrLn $ "John's currency: " ++ (show (employeeCurrency "John"))
    putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete"))
    
    The output of this program:
    John's currency: Just "Euro"
    Pete's currency: Nothing
    

  6. lookup :: Ord k => k -> NEMap k a -> Maybe a

    nonempty-containers Data.Map.NonEmpty

    O(log n). Lookup the value at a key in the map. The function will return the corresponding value as (Just value), or Nothing if the key isn't in the map. An example of using lookup:

    import Prelude hiding (lookup)
    import Data.Map.NonEmpty
    
    employeeDept = fromList (("John","Sales") :| [("Bob","IT")])
    deptCountry = fromList (("IT","USA") :| [("Sales","France")])
    countryCurrency = fromList (("USA", "Dollar") :| [("France", "Euro")])
    
    employeeCurrency :: String -> Maybe String
    employeeCurrency name = do
    dept <- lookup name employeeDept
    country <- lookup dept deptCountry
    lookup country countryCurrency
    
    main = do
    putStrLn $ "John's currency: " ++ (show (employeeCurrency "John"))
    putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete"))
    
    The output of this program:
    John's currency: Just "Euro"
    Pete's currency: Nothing
    

  7. lookup :: Int -> NESeq a -> Maybe a

    nonempty-containers Data.Sequence.NonEmpty

    The element at the specified position, counting from 0. If the specified position is negative or at least the length of the sequence, lookup returns Nothing. Unlike index, this can be used to retrieve an element without forcing it.

  8. lookup :: Eq a => a -> [(a, b)] -> Maybe b

    prelude-compat Data.List2010

    No documentation available.

  9. lookup :: Eq a => a -> [(a, b)] -> Maybe b

    prelude-compat Prelude2010

    No documentation available.

  10. lookup :: 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 ANSWER section of the response. See the documentation of lookupRaw to understand the concrete behavior. Cache is used if resolvCache is Just. Example:

    >>> rs <- makeResolvSeed defaultResolvConf
    
    >>> withResolver rs $ \resolver -> lookup resolver "www.example.com" A
    Right [93.184.216.34]
    

Page 11 of many | Previous | Next