From aaeafb059166053cf5a93683f0771e7561d6b4db Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Tue, 30 Sep 2014 12:22:44 -0700 Subject: [PATCH] add some documentation --- yesod-core/Yesod/Core/TypeCache.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yesod-core/Yesod/Core/TypeCache.hs b/yesod-core/Yesod/Core/TypeCache.hs index 12e7dd70..7be8a66d 100644 --- a/yesod-core/Yesod/Core/TypeCache.hs +++ b/yesod-core/Yesod/Core/TypeCache.hs @@ -31,7 +31,7 @@ type KeyedTypeMap = HashMap (TypeRep, ByteString) Dynamic -- Since 1.4.0 cached :: (Monad m, Typeable a) => TypeMap - -> m a + -> m a -- ^ cache the result of this action -> m (Either (TypeMap, a) a) -- ^ Left is a cache miss, Right is a hit cached cache action = case clookup cache of Just val -> return $ Right val @@ -63,7 +63,7 @@ cached cache action = case clookup cache of cachedBy :: (Monad m, Typeable a) => KeyedTypeMap -> ByteString - -> m a + -> m a -- ^ cache the result of this action -> m (Either (KeyedTypeMap, a) a) -- ^ Left is a cache miss, Right is a hit cachedBy cache k action = case clookup k cache of Just val -> return $ Right val