Hoogle Search
Within LTS Haskell 24.39 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
epsilonMaybeEq :: (Show a, RealFloat a) => a -> a -> a -> Maybe Stringmassiv-test Test.Massiv.Utils No documentation available.
fromMaybe :: a -> Maybe a -> amassiv-test Test.Massiv.Utils The fromMaybe function takes a default value and a Maybe value. If the Maybe is Nothing, it returns the default value; otherwise, it returns the value contained in the Maybe.
Examples
Basic usage:>>> fromMaybe "" (Just "Hello, World!") "Hello, World!"
>>> fromMaybe "" Nothing ""
Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:>>> import GHC.Internal.Text.Read ( readMaybe ) >>> fromMaybe 0 (readMaybe "5") 5 >>> fromMaybe 0 (readMaybe "") 0
suchThatMaybe :: Gen a -> (a -> Bool) -> Gen (Maybe a)massiv-test Test.Massiv.Utils Tries to generate a value that satisfies a predicate. If it fails to do so after enough attempts, returns Nothing.
mapMaybe :: (a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal No documentation available.
mapMaybeWithKey :: (Int -> a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal No documentation available.
mapMaybe :: (a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal.Strict No documentation available.
mapMaybeWithKey :: (Int -> a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal.Strict No documentation available.
mapMaybe :: forall k a b . (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal No documentation available.
mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal No documentation available.
-
monoidal-containers Data.Map.Monoidal No documentation available.