diff --git a/src/Control/Concurrent/CachedIO.hs b/src/Control/Concurrent/CachedIO.hs index f1a2bea..1d12899 100644 --- a/src/Control/Concurrent/CachedIO.hs +++ b/src/Control/Concurrent/CachedIO.hs @@ -30,7 +30,7 @@ import Data.Time.Clock (NominalDiffTime, addUTCTime, getCurrentTime, UTCTime) -- | A cached IO action in some monad @m@. Use 'runCached' to extract the action when you want to query it. -- -- This newtype is intended to make it harder to accidentally 'Control.Monad.join' (and defeat all caching) when the fetch action and the outer monad are the same. -newtype Cached t a = Cached {runCached :: t a} +newtype Cached m a = Cached {runCached :: m a} data State a = Uninitialized | Initializing | Updating a | Fresh UTCTime a diff --git a/test/test-cachedIO.hs b/test/test-cachedIO.hs index f1de6e4..d5cbab3 100644 --- a/test/test-cachedIO.hs +++ b/test/test-cachedIO.hs @@ -16,7 +16,7 @@ crawlTheInternet = do searchEngine :: String -> Cached IO [String] -> IO [String] searchEngine query internet = do pages <- runCached internet - return $ filter ( query `isInfixOf`) pages + return $ filter (query `isInfixOf`) pages main :: IO () main = do