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. fromJust :: HasCallStack => Maybe a -> a

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

  2. isJust :: Maybe a -> Bool

    rio RIO.Prelude

    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
    

  3. adjust :: (a -> a) -> Int -> Seq a -> Seq a

    rio RIO.Seq

    Update the element at the specified position. If the position is out of range, the original sequence is returned. adjust can lead to poor performance and even memory leaks, because it does not force the new value before installing it in the sequence. adjust' should usually be preferred.

  4. adjust' :: (a -> a) -> Int -> Seq a -> Seq a

    rio RIO.Seq

    Update the element at the specified position. If the position is out of range, the original sequence is returned. The new value is forced before it is installed in the sequence.

    adjust' f i xs =
    case xs !? i of
    Nothing -> xs
    Just x -> let !x' = f x
    in update i x' xs
    

  5. adjust :: (a -> a) -> Key a -> Vault -> Vault

    vault Data.Vault.Lazy

    Adjust the value for a given key if it's present in the vault.

  6. adjust :: (a -> a) -> Key s a -> Vault s -> Vault s

    vault Data.Vault.ST.Lazy

    Adjust the value for a given key if it's present in the vault.

  7. adjust :: (a -> a) -> Key s a -> Vault s -> Vault s

    vault Data.Vault.ST.Strict

    Adjust the value for a given key if it's present in the vault.

  8. adjust :: (a -> a) -> Key a -> Vault -> Vault

    vault Data.Vault.Strict

    Adjust the value for a given key if it's present in the vault.

  9. adjust :: (a -> a) -> Key s a -> Vault s -> Vault s

    vault Internal.Data.Vault.ST.IORef

    Adjust the value for a given key if it's present in the vault.

  10. findJustDef :: a -> (a -> Bool) -> [a] -> a

    errors Control.Error

    No documentation available.

Page 41 of many | Previous | Next