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.

  1. readMaybe :: (PrimMonad m, Unbox a) => MVector (PrimState m) a -> Int -> m (Maybe a)

    rebase Rebase.Data.Vector.Unboxed.Mutable

    No documentation available.

  2. exceptToMaybeT :: forall (m :: Type -> Type) e a . Functor m => ExceptT e m a -> MaybeT m a

    rebase Rebase.Prelude

    Convert a ExceptT computation to MaybeT, discarding the value of any exception.

  3. fromMaybeS :: Selective f => f a -> f (Maybe a) -> f a

    rebase Rebase.Prelude

    A lifted version of fromMaybe.

  4. leftToMaybe :: Either a b -> Maybe a

    rebase Rebase.Prelude

    Maybe get the Left side of an Either.

    leftToMaybeeither Just (const Nothing)
    
    Using Control.Lens:
    leftToMaybe ≡ preview _Left
    leftToMaybe x ≡ x^?_Left
    
    >>> leftToMaybe (Left 12)
    Just 12
    
    >>> leftToMaybe (Right 12)
    Nothing
    

  5. mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b

    rebase Rebase.Prelude

    Transform the computation inside a MaybeT.

  6. readMaybe :: Read a => String -> Maybe a

    rebase Rebase.Prelude

    Parse a string using the Read instance. Succeeds if there is exactly one valid result.

    >>> readMaybe "123" :: Maybe Int
    Just 123
    
    >>> readMaybe "hello" :: Maybe Int
    Nothing
    

  7. rightToMaybe :: Either a b -> Maybe b

    rebase Rebase.Prelude

    Maybe get the Right side of an Either.

    rightToMaybeeither (const Nothing) Just
    
    Using Control.Lens:
    rightToMaybe ≡ preview _Right
    rightToMaybe x ≡ x^?_Right
    
    >>> rightToMaybe (Left 12)
    Nothing
    
    >>> rightToMaybe (Right 12)
    Just 12
    

  8. runMaybeApply :: MaybeApply (f :: Type -> Type) a -> Either (f a) a

    rebase Rebase.Prelude

    No documentation available.

  9. mapMaybe :: forall (m :: Type -> Type) cl a b . Monad m => ClSF m cl a b -> ClSF m cl (Maybe a) (Maybe b)

    rhine FRP.Rhine.ClSF.Core

    Call a ClSF every time the input is 'Just a'. Caution: This will not change the time differences since the last tick. For example, while integrate 1 is approximately the same as timeInfoOf sinceInit, mapMaybe $ integrate 1 is very different from mapMaybe $ timeInfoOf sinceInit. The former only integrates when the input is Just 1, whereas the latter always returns the correct time since initialisation.

  10. throwMaybe :: forall (m :: Type -> Type) e cl a . Monad m => ClSF (ExceptT e m) cl (Maybe e) (Maybe a)

    rhine FRP.Rhine.ClSF.Except

    When the input is Just e, throw the exception e.

Page 225 of many | Previous | Next