Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- class Monad m => MonadRef m where
- cacheM :: (MonadRef m, MonadRef m', Ref m ~ Ref m') => m' a -> m (m' a, m ())
- cacheMWithTry :: (MonadRef m, MonadRef m', Ref m ~ Ref m') => m' a -> m (m' a, m (Maybe a), m ())
- memoM :: (MonadRef m, MonadRef m', Ref m ~ Ref m') => m' a -> m (m' a)
- replaceRef :: MonadRef m => Ref m a -> a -> m a
- modifyRef :: MonadRef m => Ref m a -> (a -> a) -> m ()
Documentation
cacheMWithTry :: (MonadRef m, MonadRef m', Ref m ~ Ref m') => m' a -> m (m' a, m (Maybe a), m ()) Source
memoM :: (MonadRef m, MonadRef m', Ref m ~ Ref m') => m' a -> m (m' a) Source
Not thread-safe or reentrant
replaceRef :: MonadRef m => Ref m a -> a -> m a Source