| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Capabilities.Cache
Description
Defines a monad context for caching.
Synopsis
- class Monad m => MonadCache (m :: Type -> Type) where
- appendCollisionFile :: FilePath -> String -> m ()
- doesCacheExist :: FilePath -> m Bool
- readShowFile :: FilePath -> m ByteString
- writeShowFile :: FilePath -> ByteString -> m ()
- cache :: (MonadCache m, Show a) => FilePath -> String -> String -> a -> (a -> m ByteString) -> m FilePath
- short :: Enum a => a -> String
Documentation
class Monad m => MonadCache (m :: Type -> Type) where Source #
Methods
appendCollisionFile :: FilePath -> String -> m () Source #
doesCacheExist :: FilePath -> m Bool Source #
readShowFile :: FilePath -> m ByteString Source #
writeShowFile :: FilePath -> ByteString -> m () Source #
Instances
| MonadCache m => MonadCache (GenericReportT l o m) Source # | |
Defined in Capabilities.Cache Methods appendCollisionFile :: FilePath -> String -> GenericReportT l o m () Source # doesCacheExist :: FilePath -> GenericReportT l o m Bool Source # readShowFile :: FilePath -> GenericReportT l o m ByteString Source # writeShowFile :: FilePath -> ByteString -> GenericReportT l o m () Source # | |
Arguments
| :: (MonadCache m, Show a) | |
| => FilePath | base file path (prefix of file name) |
| -> String | path suffix (including dot and extension) |
| -> String | some identifying name for what (part of file name) |
| -> a | what |
| -> (a -> m ByteString) | how to create something from what |
| -> m FilePath |