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.
naturalToWordMaybe# :: Natural -> (# (# #) | Word# #)base GHC.Num No documentation available.
indexMaybe :: ByteString -> Int -> Maybe Word8bytestring Data.ByteString O(1) ByteString index, starting from 0, that returns Just if:
0 <= n < length bs
indexMaybe :: ByteString -> Int -> Maybe Charbytestring Data.ByteString.Char8 O(1) ByteString index, starting from 0, that returns Just if:
0 <= n < length bs
indexMaybe :: ByteString -> Int64 -> Maybe Word8bytestring Data.ByteString.Lazy O(c) ByteString index, starting from 0, that returns Just if:
0 <= n < length bs
indexMaybe :: ByteString -> Int64 -> Maybe Charbytestring Data.ByteString.Lazy.Char8 O(1) ByteString index, starting from 0, that returns Just if:
0 <= n < length bs
indexMaybe :: ShortByteString -> Int -> Maybe Word8bytestring Data.ByteString.Short O(1) ShortByteString index, starting from 0, that returns Just if:
0 <= n < length bs
indexMaybe :: ShortByteString -> Int -> Maybe Word8bytestring Data.ByteString.Short.Internal O(1) ShortByteString index, starting from 0, that returns Just if:
0 <= n < length bs
mapMaybe :: (a -> Maybe b) -> IntMap a -> IntMap bcontainers 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"
-
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. mapMaybeWithKey :: (Key -> a -> Maybe b) -> IntMap a -> IntMap bcontainers 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"