Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
maybeWarningLeaf :: Leaf name str -> Maybe Stringwraxml Text.XML.WraXML.Tree No documentation available.
-
yesod-auth-oauth2 Yesod.Auth.OAuth2.Prelude Retrieves user credentials, if user is authenticated. By default, this calls defaultMaybeAuthId to get the user ID from the session. This can be overridden to allow authentication via other means, such as checking for a special token in a request header. This is especially useful for creating an API to be accessed via some means other than a browser.
maybeMult :: Num a => Maybe a -> Maybe a -> Maybe ayi-keymap-vim Yi.Keymap.Vim.StateUtils No documentation available.
maybeMP :: MonadPlus m => Maybe a -> m aIfElse Control.Monad.IfElse This conversion is common enough to make a name for.
maybeAtom :: Alternative p => p a -> Perms p (Maybe a)action-permutations Control.Applicative.Permutation Like atom, but the action may be omitted from the permutation.
When building permutation parsers, the argument parser should not match the empty string.maybeQuot :: IntegralDomain d => d -> d -> Maybe dalgebra Numeric.Domain.Integral No documentation available.
maybeDelegate :: MonadDelegate r m => r -> m (Maybe a) -> m aalternators Control.Monad.Delegate maybe delegate the Just value, or just use the r.
maybeAuthorized :: Yesod site => Route site -> Bool -> HandlerT site IO (Maybe (Route site))classy-prelude-yesod ClassyPrelude.Yesod Return the same URL if the user is authorized to see it. Built on top of isAuthorized. This is useful for building page that only contain links to pages the user is allowed to see.
-
classy-prelude-yesod ClassyPrelude.Yesod Wrap the base monad in MaybeT Since 1.0.11
-
classy-prelude-yesod ClassyPrelude.Yesod The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.
Examples
Basic usage:>>> maybeToList (Just 7) [7]
>>> maybeToList Nothing []
One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:>>> import GHC.Internal.Text.Read ( readMaybe ) >>> sum $ maybeToList (readMaybe "3") 3 >>> sum $ maybeToList (readMaybe "") 0