Hoogle Search

Within LTS Haskell 24.60 (ghc-9.10.3)

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

  1. lookupElement :: Hashable a => a -> HashSet a -> Maybe a

    unordered-containers Data.HashSet

    For a given value, return the equal element in the set if present, otherwise return Nothing. This is useful for interning, i.e. to reduce memory usage.

  2. lookupElement :: Hashable a => a -> HashSet a -> Maybe a

    unordered-containers Data.HashSet.Internal

    For a given value, return the equal element in the set if present, otherwise return Nothing. This is useful for interning, i.e. to reduce memory usage.

  3. lookupOf :: Eq k => Getting (Endo (Maybe v)) s (k, v) -> k -> s -> Maybe v

    lens Control.Lens.Combinators

    The lookupOf function takes a Fold (or Getter, Traversal, Lens, Iso, etc.), a key, and a structure containing key/value pairs. It returns the first value corresponding to the given key. This function generalizes lookup to work on an arbitrary Fold instead of lists.

    >>> lookupOf folded 4 [(2, 'a'), (4, 'b'), (4, 'c')]
    Just 'b'
    
    >>> lookupOf each 2 [(2, 'a'), (4, 'b'), (4, 'c')]
    Just 'a'
    
    lookupOf :: Eq k => Fold s (k,v) -> k -> s -> Maybe v
    

  4. lookupOf :: Eq k => Getting (Endo (Maybe v)) s (k, v) -> k -> s -> Maybe v

    lens Control.Lens.Fold

    The lookupOf function takes a Fold (or Getter, Traversal, Lens, Iso, etc.), a key, and a structure containing key/value pairs. It returns the first value corresponding to the given key. This function generalizes lookup to work on an arbitrary Fold instead of lists.

    >>> lookupOf folded 4 [(2, 'a'), (4, 'b'), (4, 'c')]
    Just 'b'
    
    >>> lookupOf each 2 [(2, 'a'), (4, 'b'), (4, 'c')]
    Just 'a'
    
    lookupOf :: Eq k => Fold s (k,v) -> k -> s -> Maybe v
    

  5. lookupCmsg :: CmsgId -> [Cmsg] -> Maybe Cmsg

    network Network.Socket

    Locate a control message of the given type in a list of control messages. The following shows an example usage:

    (lookupCmsg CmsgIdIPv4TOS cmsgs >>= decodeCmsg) :: Maybe IPv4TOS
    

  6. lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r . HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a

    gogol-core Gogol.Prelude

    Look up a specific ResponseHeader, without having to know what position it is in the HList.

    >>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String
    
    >>> let example2 = addHeader True example1 :: Headers '[Header "1st" Bool, Header "someheader" Int] String
    
    >>> lookupResponseHeader example2 :: ResponseHeader "someheader" Int
    Header 5
    
    >>> lookupResponseHeader example2 :: ResponseHeader "1st" Bool
    Header True
    
    Usage of this function relies on an explicit type annotation of the header to be looked up. This can be done with type annotations on the result, or with an explicit type application. In this example, the type of header value is determined by the type-inference, we only specify the name of the header:
    >>> :set -XTypeApplications
    
    >>> case lookupResponseHeader @"1st" example2 of { Header b -> b ; _ -> False }
    True
    

  7. lookupEnv :: MonadIO m => String -> m (Maybe String)

    unliftio UnliftIO.Environment

    Lifted lookupEnv.

  8. lookupJust :: (Eq a, Partial) => a -> [(a, b)] -> b

    safe Safe

    lookupJust key = fromJust . lookup key
    

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

    safe Safe

    No documentation available.

  10. lookupJustNote :: (Partial, Eq a) => String -> a -> [(a, b)] -> b

    safe Safe

    No documentation available.

Page 40 of many | Previous | Next