Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | eduard.sergeev@gmail.com |
Safe Haskell | Safe-Inferred |
Generic StateCache - similar to ReaderT
but optimised for carrying cache container
- newtype ReaderCache c m a = ReaderCache {
- evalReaderCache :: c -> m a
- container :: Monad m => ReaderCache c m c
Documentation
newtype ReaderCache c m a Source
Generic memoization cache which uses provided container
This is pretty much identical to ReaderT
,
but is tuned to speed up implementations which use unboxed mutable containers
ReaderCache | |
|
(PrimMonad m, ~ * (PrimState m) s, MaybeLike e v, MVector c e) => MonadMemo Int v (Cache c s e m) | |
(PrimMonad m, ~ * (PrimState m) s, MaybeLike e v, MVector c e) => MonadMemo Int v (Cache c s e m) | |
(Monad m, Ix k, MaybeLike e v, MArray c e m) => MonadMemo k v (Cache c k e m) | |
(PrimMonad m, ~ * (PrimState m) s, MaybeLike e v, MVector c e) => MonadCache Int v (Cache c s e m) | |
(PrimMonad m, ~ * (PrimState m) s, MaybeLike e v, MVector c e) => MonadCache Int v (Cache c s e m) | |
(Monad m, Ix k, MaybeLike e v, MArray c e m) => MonadCache k v (Cache c k e m) | |
MonadTrans (ReaderCache c) | |
Monad m => Monad (ReaderCache c m) | |
Functor m => Functor (ReaderCache c m) | |
MonadFix m => MonadFix (ReaderCache c m) | |
MonadPlus m => MonadPlus (ReaderCache c m) | |
Applicative m => Applicative (ReaderCache arr m) | |
Alternative m => Alternative (ReaderCache c m) | |
MonadIO m => MonadIO (ReaderCache c m) |
container :: Monad m => ReaderCache c m cSource
Returns internal container