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.

  1. _Just :: forall a b p f . (Choice p, Applicative f) => p a (f b) -> p (Maybe a) (f (Maybe b))

    proto-lens Data.ProtoLens.Prism

    No documentation available.

  2. catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a

    protolude Protolude

    The function catchJust is like catch, but it takes an extra argument which is an exception predicate, a function which selects which type of exceptions we're interested in.

    catchJust (\e -> if isDoesNotExistErrorType (ioeGetErrorType e) then Just () else Nothing)
    (readFile f)
    (\_ -> do hPutStrLn stderr ("No such file: " ++ show f)
    return "")
    
    Any other exceptions which are not matched by the predicate are re-raised, and may be caught by an enclosing catch, catchJust, etc.

  3. handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a

    protolude Protolude

    A version of catchJust with the arguments swapped around (see handle).

  4. isJust :: Maybe a -> Bool

    protolude Protolude

    The isJust function returns True iff its argument is of the form Just _.

    Examples

    Basic usage:
    >>> isJust (Just 3)
    True
    
    >>> isJust (Just ())
    True
    
    >>> isJust Nothing
    False
    
    Only the outer constructor is taken into consideration:
    >>> isJust (Just Nothing)
    True
    

  5. tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a)

    protolude Protolude

    A variant of try that takes an exception predicate to select which exceptions are caught (c.f. catchJust). If the exception does not match the predicate, it is re-thrown.

  6. fromJust :: HasCallStack => Maybe a -> a

    protolude Protolude.Partial

    The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.

    Examples

    Basic usage:
    >>> fromJust (Just 1)
    1
    
    >>> 2 * (fromJust (Just 10))
    20
    
    >>> 2 * (fromJust Nothing)
    *** Exception: Maybe.fromJust: Nothing
    ...
    
    WARNING: This function is partial. You can use case-matching instead.

  7. unsafeFromJust :: HasCallStack => Maybe a -> a

    protolude Protolude.Unsafe

    No documentation available.

  8. class (Reflex t, Monad m) => Adjustable t (m :: Type -> Type) | m -> t

    reflex Reflex.Adjustable.Class

    A Monad that supports adjustment over time. After an action has been run, if the given events fire, it will adjust itself so that its net effect is as though it had originally been run with the new value. Note that there is some issue here with persistent side-effects: obviously, IO (and some other side-effects) cannot be undone, so it is up to the instance implementer to determine what the best meaning for this class is in such cases.

  9. type MonadAdjust = Adjustable

    reflex Reflex.Adjustable.Class

    Deprecated: Use Adjustable instead

  10. mapMapWithAdjustWithMove :: (Adjustable t m, Ord k) => (k -> v -> m v') -> Map k v -> Event t (PatchMapWithMove k v) -> m (Map k v', Event t (PatchMapWithMove k v'))

    reflex Reflex.Adjustable.Class

    Traverses a Map, running the provided Adjustable action. The provided Event of patches to the Map can add, remove, update, move, or swap values.

Page 50 of many | Previous | Next