Hoogle Search
Within LTS Haskell 24.5 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
maybeToFailure :: a -> Maybe e -> Validation e avalidation-selective Validation Maps Just to Failure In case of Nothing it wraps the given default value into Success.
>>> maybeToFailure True (Just "aba") Failure "aba" >>> maybeToFailure True Nothing Success True
maybeToSuccess :: e -> Maybe a -> Validation e avalidation-selective Validation Maps Just to Success. In case of Nothing it wraps the given default value into Failure
>>> maybeToSuccess True (Just "aba") Success "aba" >>> maybeToSuccess True Nothing Failure True
maybeToFailure :: a -> Maybe e -> Validation e avalidation-selective Validation.Combinators Maps Just to Failure In case of Nothing it wraps the given default value into Success.
>>> maybeToFailure True (Just "aba") Failure "aba" >>> maybeToFailure True Nothing Success True
maybeToSuccess :: e -> Maybe a -> Validation e avalidation-selective Validation.Combinators Maps Just to Success. In case of Nothing it wraps the given default value into Failure
>>> maybeToSuccess True (Just "aba") Success "aba" >>> maybeToSuccess True Nothing Failure True
-
web-rep Web.Rep.SharedReps Represent a Maybe using a checkbox. Hides the underlying content on Nothing
maybePartExpr :: IsExprBuilder sym => sym -> Maybe a -> PartExpr (Pred sym) awhat4 What4.Partial Create a part expression from a maybe value.
maybeTryFrom :: (source -> Maybe target) -> source -> Either (TryFromException source target) targetwitch Witch This function can be used to implement tryFrom with a function that returns Maybe. For example:
-- Avoid this: tryFrom s = case f s of Nothing -> Left $ TryFromException s Nothing Just t -> Right t -- Prefer this: tryFrom = maybeTryFrom f
maybeTryFrom :: (source -> Maybe target) -> source -> Either (TryFromException source target) targetwitch Witch.Utility This function can be used to implement tryFrom with a function that returns Maybe. For example:
-- Avoid this: tryFrom s = case f s of Nothing -> Left $ TryFromException s Nothing Just t -> Right t -- Prefer this: tryFrom = maybeTryFrom f
-
yesod-auth Yesod.Auth Similar to maybeAuthId, but additionally look up the value associated with the user's database identifier to get the value in the database. This assumes that you are using a Persistent database.
-
yesod-auth Yesod.Auth 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.