Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. maybeToFailure :: a -> Maybe e -> Validation e a

    validation-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
    

  2. maybeToSuccess :: e -> Maybe a -> Validation e a

    validation-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
    

  3. maybeRep :: forall (m :: Type -> Type) a . Monad m => Maybe ByteString -> Bool -> SharedRep m a -> SharedRep m (Maybe a)

    web-rep Web.Rep.SharedReps

    Represent a Maybe using a checkbox. Hides the underlying content on Nothing

  4. maybePartExpr :: IsExprBuilder sym => sym -> Maybe a -> PartExpr (Pred sym) a

    what4 What4.Partial

    Create a part expression from a maybe value.

  5. maybeTryFrom :: (source -> Maybe target) -> source -> Either (TryFromException source target) target

    witch 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
    

  6. maybeTryFrom :: (source -> Maybe target) -> source -> Either (TryFromException source target) target

    witch 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
    

  7. maybeAuth :: (YesodAuthPersist master, val ~ AuthEntity master, Key val ~ AuthId master, PersistEntity val, Typeable val, MonadHandler m, HandlerSite m ~ master) => m (Maybe (Entity val))

    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.

  8. maybeAuthId :: (YesodAuth master, MonadHandler m, master ~ HandlerSite m) => m (Maybe (AuthId master))

    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.

  9. maybeAuthPair :: (YesodAuthPersist master, Typeable (AuthEntity master), MonadHandler m, HandlerSite m ~ master) => m (Maybe (AuthId master, AuthEntity master))

    yesod-auth Yesod.Auth

    Similar to maybeAuth, but doesn’t assume that you are using a Persistent database.

  10. maybeAbort :: (IOTCM -> CommandM a) -> CommandM (Command' (Maybe a))

    Agda Agda.Interaction.InteractionTop

    If the next command from the command queue is anything but an actual command, then the command is returned. If the command is an IOTCM command, then the following happens: The given computation is applied to the command and executed. If an abort command is encountered (and acted upon), then the computation is interrupted, the persistent state and all options are restored, and some commands are sent to the frontend. If the computation was not interrupted, then its result is returned.

Page 46 of many | Previous | Next