Hoogle Search

Within LTS Haskell 24.35 (ghc-9.10.3)

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

  1. 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)
    

  2. 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'
    

  3. lookupEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

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

  4. lookupNamedEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

    Lookup a named entity, using htmlEntities

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

  5. 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
    

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

    autodocodec Autodocodec.Aeson.Compat

    No documentation available.

  7. 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.

  8. lookupGE :: Ord k => k -> Map k v -> Maybe (k, v)

    rio RIO.Map

    Find smallest key greater or equal to the given one and return the corresponding (key, value) pair.

    lookupGE 3 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a')
    lookupGE 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')
    lookupGE 6 (fromList [(3,'a'), (5,'b')]) == Nothing
    

  9. lookupGT :: Ord k => k -> Map k v -> Maybe (k, v)

    rio RIO.Map

    Find smallest key greater than the given one and return the corresponding (key, value) pair.

    lookupGT 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')
    lookupGT 5 (fromList [(3,'a'), (5,'b')]) == Nothing
    

  10. lookupIndex :: Ord k => k -> Map k a -> Maybe Int

    rio RIO.Map

    Lookup the index of a key, which is its zero-based index in the sequence sorted by keys. The index is a number from 0 up to, but not including, the size of the map.

    isJust (lookupIndex 2 (fromList [(5,"a"), (3,"b")]))   == False
    fromJust (lookupIndex 3 (fromList [(5,"a"), (3,"b")])) == 0
    fromJust (lookupIndex 5 (fromList [(5,"a"), (3,"b")])) == 1
    isJust (lookupIndex 6 (fromList [(5,"a"), (3,"b")]))   == False
    

Page 69 of many | Previous | Next