| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Expire
- expireSteps :: Int
- newtype Expire a = Expire {}
- newtype ExpireIO a = ExpireIO {}
- stepExpire :: Int -> a -> (Int, Maybe a)
- stepExpireMaybe :: Int -> Maybe a -> (Int, Maybe a)
- coerceWeak :: Weak a -> Weak b
- getExpireIO :: ExpireIO a -> IO (Maybe a)
- dumpExpireIO :: ExpireIO a -> IO (Maybe (Int, a))
- killExpireIO :: ExpireIO a -> IO ()
- newtype ExpireE a = ExpireE {
- getExpireE :: (Int, a)
Documentation
expireSteps :: Int Source #
expireSteps is a global number of steps taken for expiration.
The idea is that the monad will throw some sort of exception, or result in Nothing,
when more than this many Functor, Applicative, or Monad steps (actions) have been taken.
Pure expiration, return Nothing to expire
stepExpire :: Int -> a -> (Int, Maybe a) Source #
Note: stepExpire will never halt if Int is negative, so instead it throws an error
stepExpireMaybe :: Int -> Maybe a -> (Int, Maybe a) Source #
stepExpire for Maybe
coerceWeak :: Weak a -> Weak b Source #
Note: This is only safe if a Weak pointer has _already_ been dereferenced
Constructors
| ExpireE | |
Fields
| |