Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. 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
    

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

    rebase Rebase.Prelude

    Transform the computation inside a MaybeT.

  3. 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
    

  4. 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
    

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

    rebase Rebase.Prelude

    No documentation available.

  6. 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.

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

  8. emitSMaybe :: forall (m :: Type -> Type) event cl . MonadIO m => ClSF (EventChanT event m) cl (Maybe event) ()

    rhine FRP.Rhine.Clock.Realtime.Event

    Emit an event whenever the input value is Just event.

  9. emitSMaybe' :: forall event (m :: Type -> Type) cl . (NFData event, MonadIO m) => ClSF (EventChanT event m) cl (Maybe event) ()

    rhine FRP.Rhine.Clock.Realtime.Event

    Like emitSMaybe, but completely evaluates the event before emitting it.

  10. satisfyMaybe :: (Word8 -> Bool) -> Scanner (Maybe Word8)

    scanner Scanner

    Consume a single octet in case it satisfies the predicate

Page 226 of many | Previous | Next