Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. isJust :: Maybe a -> Bool

    base Data.Maybe

    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
    

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

    base Control.Exception

    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

    base Control.Exception

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

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

    base Control.Exception

    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.

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

    base Control.Exception.Base

    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.

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

    base Control.Exception.Base

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

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

    base Control.Exception.Base

    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.

  8. data FormatAdjustment

    base Text.Printf

    Whether to left-adjust or zero-pad a field. These are mutually exclusive, with LeftAdjust taking precedence.

  9. LeftAdjust :: FormatAdjustment

    base Text.Printf

    No documentation available.

  10. fmtAdjust :: FieldFormat -> Maybe FormatAdjustment

    base Text.Printf

    Kind of filling or padding to be done.

Page 25 of many | Previous | Next