| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cryptol.Project.Cache
Synopsis
- type CacheId = ByteString
- emptyCacheId :: CacheId
- newtype LoadCache = LoadCache {}
- toCacheModulePath :: ModulePath -> CacheModulePath
- data CacheModulePath
- data CacheEntry = CacheEntry {}
- data FullFingerprint = FullFingerprint {}
- metaDir :: FilePath
- loadCachePath :: FilePath
- emptyLoadCache :: LoadCache
- loadLoadCache :: IO (LoadCache, CacheId)
- saveLoadCache :: LoadCache -> IO ByteString
Documentation
type CacheId = ByteString Source #
This is something to identify a particular cache state. We use a hash of the cache file at the moment.
The load cache. This is what persists across invocations.
Constructors
| LoadCache | |
Fields | |
data CacheModulePath Source #
Constructors
| CacheInMem String | module name |
| CacheInFile FilePath | absolute file path |
Instances
| Read CacheModulePath Source # | |
Defined in Cryptol.Project.Cache Methods readsPrec :: Int -> ReadS CacheModulePath # readList :: ReadS [CacheModulePath] # | |
| Show CacheModulePath Source # | |
Defined in Cryptol.Project.Cache Methods showsPrec :: Int -> CacheModulePath -> ShowS # show :: CacheModulePath -> String # showList :: [CacheModulePath] -> ShowS # | |
| Eq CacheModulePath Source # | |
Defined in Cryptol.Project.Cache Methods (==) :: CacheModulePath -> CacheModulePath -> Bool # (/=) :: CacheModulePath -> CacheModulePath -> Bool # | |
| Ord CacheModulePath Source # | |
Defined in Cryptol.Project.Cache Methods compare :: CacheModulePath -> CacheModulePath -> Ordering # (<) :: CacheModulePath -> CacheModulePath -> Bool # (<=) :: CacheModulePath -> CacheModulePath -> Bool # (>) :: CacheModulePath -> CacheModulePath -> Bool # (>=) :: CacheModulePath -> CacheModulePath -> Bool # max :: CacheModulePath -> CacheModulePath -> CacheModulePath # min :: CacheModulePath -> CacheModulePath -> CacheModulePath # | |
data CacheEntry Source #
Constructors
| CacheEntry | |
Fields
| |
Instances
| Read CacheEntry Source # | |
Defined in Cryptol.Project.Cache Methods readsPrec :: Int -> ReadS CacheEntry # readList :: ReadS [CacheEntry] # readPrec :: ReadPrec CacheEntry # readListPrec :: ReadPrec [CacheEntry] # | |
| Show CacheEntry Source # | |
Defined in Cryptol.Project.Cache Methods showsPrec :: Int -> CacheEntry -> ShowS # show :: CacheEntry -> String # showList :: [CacheEntry] -> ShowS # | |
data FullFingerprint Source #
The full fingerprint hashes the module, but also the contents of included files and foreign libraries.
Constructors
| FullFingerprint | |
Instances
| Read FullFingerprint Source # | |
Defined in Cryptol.Project.Cache Methods readsPrec :: Int -> ReadS FullFingerprint # readList :: ReadS [FullFingerprint] # | |
| Show FullFingerprint Source # | |
Defined in Cryptol.Project.Cache Methods showsPrec :: Int -> FullFingerprint -> ShowS # show :: FullFingerprint -> String # showList :: [FullFingerprint] -> ShowS # | |
| Eq FullFingerprint Source # | |
Defined in Cryptol.Project.Cache Methods (==) :: FullFingerprint -> FullFingerprint -> Bool # (/=) :: FullFingerprint -> FullFingerprint -> Bool # | |
Directory where to store the project state. XXX: This should probably be a parameter
loadLoadCache :: IO (LoadCache, CacheId) Source #
Load a cache. Also returns an id for the cache. If there is no cache (or it failed to load), then we return an empty id.
saveLoadCache :: LoadCache -> IO ByteString Source #
Save the cache. Returns an id for the cache.