Skip to content

Repository files navigation

effectful-data-cache

import Effectful
import Effectful.Cache
import Prelude hiding (lookup)

main :: IO ()
main = runEff . runCache Nothing $ do
  insert "key" (42 :: Int)
  v <- lookup @String @Int "key"
  liftIO $ print v

runCache creates a fresh store; runCacheWith wraps an existing Data.Cache.Cache so it can be shared with non-effectful code.

About

Data cache effect for the `effectful` system

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages