Hoogle Search
Within LTS Haskell 24.26 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gogol-core Gogol.Prelude No documentation available.
fromBool :: Num a => Bool -> aunliftio UnliftIO.Foreign Convert a Haskell Bool to its numeric representation
toBool :: (Eq a, Num a) => a -> Boolunliftio UnliftIO.Foreign Convert a Boolean in numeric representation to a Haskell value
catchBool :: Exception e => (e -> Bool) -> IO a -> (e -> IO a) -> IO aextra Control.Exception.Extra Catch an exception if the predicate passes, then call the handler with the original exception. As an example:
readFileExists x == catchBool isDoesNotExistError (readFile "myfile") (const $ pure "")
handleBool :: Exception e => (e -> Bool) -> (e -> IO a) -> IO a -> IO aextra Control.Exception.Extra retryBool :: Exception e => (e -> Bool) -> Int -> IO a -> IO aextra Control.Exception.Extra Retry an operation at most n times (n must be positive), while the exception value and type match a predicate. If the operation fails the nth time it will throw that final exception.
tryBool :: Exception e => (e -> Bool) -> IO a -> IO (Either e a)extra Control.Exception.Extra catchBool :: Exception e => (e -> Bool) -> IO a -> (e -> IO a) -> IO aextra Extra Catch an exception if the predicate passes, then call the handler with the original exception. As an example:
readFileExists x == catchBool isDoesNotExistError (readFile "myfile") (const $ pure "")
handleBool :: Exception e => (e -> Bool) -> (e -> IO a) -> IO a -> IO aextra Extra retryBool :: Exception e => (e -> Bool) -> Int -> IO a -> IO aextra Extra Retry an operation at most n times (n must be positive), while the exception value and type match a predicate. If the operation fails the nth time it will throw that final exception.