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.

  1. lookupAll :: Routable k => AddrRange k -> IPRTable k a -> [(AddrRange k, a)]

    iproute Data.IP.RouteTable

    lookupAll is a version of lookup that returns all entries matching the given key, not just the longest match.

    >>> :set -XOverloadedStrings
    
    >>> let rt = fromList ([("192.168.0.0/24", 1), ("10.10.0.0/16", 2), ("10.0.0.0/8", 3)] :: [(AddrRange IPv4, Int)])
    
    >>> lookupAll "127.0.0.1" rt
    []
    
    >>> lookupAll "192.168.0.1" rt
    [(192.168.0.0/24,1)]
    
    >>> lookupAll "10.10.0.1" rt
    [(10.10.0.0/16,2),(10.0.0.0/8,3)]
    

  2. lookupKeyValue :: Routable k => AddrRange k -> IPRTable k a -> Maybe (AddrRange k, a)

    iproute Data.IP.RouteTable

    The lookupKeyValue function looks up IPRTable with a key of AddrRange. If a routing information in IPRTable matches the key, both key and value are returned.

    >>> :set -XOverloadedStrings
    
    >>> let rt = fromList ([("192.168.0.0/24", 1), ("10.10.0.0/16", 2)] :: [(AddrRange IPv4, Int)])
    
    >>> lookupKeyValue "127.0.0.1" rt
    Nothing
    
    >>> lookupKeyValue "192.168.0.1" rt
    Just (192.168.0.0/24,1)
    
    >>> lookupKeyValue "10.10.0.1" rt
    Just (10.10.0.0/16,2)
    

  3. lookupAll :: Routable k => AddrRange k -> IPRTable k a -> [(AddrRange k, a)]

    iproute Data.IP.RouteTable.Internal

    lookupAll is a version of lookup that returns all entries matching the given key, not just the longest match.

    >>> :set -XOverloadedStrings
    
    >>> let rt = fromList ([("192.168.0.0/24", 1), ("10.10.0.0/16", 2), ("10.0.0.0/8", 3)] :: [(AddrRange IPv4, Int)])
    
    >>> lookupAll "127.0.0.1" rt
    []
    
    >>> lookupAll "192.168.0.1" rt
    [(192.168.0.0/24,1)]
    
    >>> lookupAll "10.10.0.1" rt
    [(10.10.0.0/16,2),(10.0.0.0/8,3)]
    

  4. lookupKeyValue :: Routable k => AddrRange k -> IPRTable k a -> Maybe (AddrRange k, a)

    iproute Data.IP.RouteTable.Internal

    The lookupKeyValue function looks up IPRTable with a key of AddrRange. If a routing information in IPRTable matches the key, both key and value are returned.

    >>> :set -XOverloadedStrings
    
    >>> let rt = fromList ([("192.168.0.0/24", 1), ("10.10.0.0/16", 2)] :: [(AddrRange IPv4, Int)])
    
    >>> lookupKeyValue "127.0.0.1" rt
    Nothing
    
    >>> lookupKeyValue "192.168.0.1" rt
    Just (192.168.0.0/24,1)
    
    >>> lookupKeyValue "10.10.0.1" rt
    Just (10.10.0.0/16,2)
    

  5. lookupOf :: forall k a (is :: IxList) s v . (Is k A_Fold, Eq a) => Optic' k is s (a, v) -> a -> s -> Maybe v

    optics-core Optics.Fold

    The lookupOf function takes a Fold, 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 folded 2 [(2, 'a'), (4, 'b'), (4, 'c')]
    Just 'a'
    

  6. lookupEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

    Lookup an entity, using lookupNumericEntity if it starts with # and lookupNamedEntity otherwise

  7. lookupNamedEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

    Lookup a named entity, using htmlEntities

    lookupNamedEntity "amp" == Just "&"
    lookupNamedEntity "haskell" == Nothing
    

  8. lookupNumericEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

    Lookup a numeric entity, the leading '#' must have already been removed.

    lookupNumericEntity "65" == Just "A"
    lookupNumericEntity "x41" == Just "A"
    lookupNumericEntity "x4E" === Just "N"
    lookupNumericEntity "x4e" === Just "N"
    lookupNumericEntity "X4e" === Just "N"
    lookupNumericEntity "Haskell" == Nothing
    lookupNumericEntity "" == Nothing
    lookupNumericEntity "89439085908539082" == Nothing
    

  9. lookupKey :: Key -> KeyMap v -> Maybe v

    autodocodec Autodocodec.Aeson.Compat

    No documentation available.

  10. lookupDefault :: (Eq k, Hashable k) => v -> k -> HashMap k v -> v

    rio RIO.HashMap

    Return the value to which the specified key is mapped, or the default value if this map contains no mapping for the key. DEPRECATED: lookupDefault is deprecated as of version 0.2.11, replaced by findWithDefault.

Page 68 of many | Previous | Next