Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
relational-schemas Database.Custom.IBMDB2 Operator from maybe type using record extended isNull.
-
relational-schemas Database.Custom.MySQL Operator from maybe type using record extended isNull.
-
relational-schemas Database.Custom.Oracle Operator from maybe type using record extended isNull.
-
relational-schemas Database.Custom.PostgreSQL Operator from maybe type using record extended isNull.
-
relational-schemas Database.Custom.SQLServer Operator from maybe type using record extended isNull.
-
relational-schemas Database.Custom.SQLite3 Operator from maybe type using record extended isNull.
fromMaybe :: a -> Maybe a -> averset Verset 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
-
foldl Control.Foldl.NonEmpty instance Monad m => Semigroup (FromMaybe m a) where mappend (FromMaybe f) (FromMaybe g) = FromMaybeM (f . Just . g)
FromMaybe :: (Maybe b -> b) -> FromMaybe bfoldl Control.Foldl.NonEmpty No documentation available.
data
FromMaybe (a :: k) (b :: Maybe k) (c :: k)first-class-families Fcf No documentation available.