Hoogle Search

Within LTS Haskell 24.26 (ghc-9.10.3)

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

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

  2. lookupEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

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

  3. lookupNamedEntity :: String -> Maybe String

    tagsoup Text.HTML.TagSoup.Entity

    Lookup a named entity, using htmlEntities

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

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

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

    autodocodec Autodocodec.Aeson.Compat

    No documentation available.

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

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

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

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

  10. lookupLE :: Ord k => k -> Map k v -> Maybe (k, v)

    rio RIO.Map

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

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

Page 69 of many | Previous | Next