Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

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

  1. naturalToWordMaybe# :: Natural -> (# (# #) | Word# #)

    base GHC.Num

    No documentation available.

  2. indexMaybe :: ByteString -> Int -> Maybe Word8

    bytestring Data.ByteString

    O(1) ByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  3. indexMaybe :: ByteString -> Int -> Maybe Char

    bytestring Data.ByteString.Char8

    O(1) ByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  4. indexMaybe :: ByteString -> Int64 -> Maybe Word8

    bytestring Data.ByteString.Lazy

    O(c) ByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  5. indexMaybe :: ByteString -> Int64 -> Maybe Char

    bytestring Data.ByteString.Lazy.Char8

    O(1) ByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  6. indexMaybe :: ShortByteString -> Int -> Maybe Word8

    bytestring Data.ByteString.Short

    O(1) ShortByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  7. indexMaybe :: ShortByteString -> Int -> Maybe Word8

    bytestring Data.ByteString.Short.Internal

    O(1) ShortByteString index, starting from 0, that returns Just if:

    0 <= n < length bs
    

  8. mapMaybe :: (a -> Maybe b) -> IntMap a -> IntMap b

    containers Data.IntMap.Internal

    Map values and collect the Just results.

    let f x = if x == "a" then Just "new a" else Nothing
    mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a"
    

  9. mapMaybeMissing :: forall (f :: Type -> Type) x y . Applicative f => (Key -> x -> Maybe y) -> WhenMissing f x y

    containers Data.IntMap.Internal

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (Key -> x -> Maybe y) -> SimpleWhenMissing x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

  10. mapMaybeWithKey :: (Key -> a -> Maybe b) -> IntMap a -> IntMap b

    containers Data.IntMap.Internal

    Map keys/values and collect the Just results.

    let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
    mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"
    

Page 100 of many | Previous | Next