Agda-2.6.4.3: A dependently typed functional programming language and proof assistant
Safe HaskellNone
LanguageHaskell2010

Agda.Utils.Memo

Synopsis

Documentation

memo :: MonadState s m => Lens' s (Maybe a) -> m a -> m a Source #

Simple, non-reentrant memoisation.

memoRec :: MonadState s m => Lens' s (Maybe a) -> a -> m a -> m a Source #

Recursive memoisation, second argument is the value you get on recursive calls.

memoUnsafe :: Ord a => (a -> b) -> a -> b Source #

memoUnsafeH :: (Eq a, Hashable a) => (a -> b) -> a -> b Source #