autotool-capabilities
Safe HaskellNone
LanguageHaskell2010

Capabilities.Cache

Description

Defines a monad context for caching.

Synopsis

Documentation

cache 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 

Caches some file which is generated by using some Showable input. The textual representation (using show) of the input is stored in a file next to the generated output. The provided file path is extended by the provided name, a hash of the textual representation of the input, and the extension.

short :: Enum a => a -> String Source #