hakyll-4.11.0.0: A static website compiler library

Safe HaskellSafe
LanguageHaskell2010

Hakyll.Core.Store

Description

A store for storing and retreiving items

Synopsis

Documentation

data Store Source #

Instances

data Result a Source #

Result of a store query

Constructors

Found a

Found, result

NotFound

Not found

WrongType TypeRep TypeRep

Expected, true type

Instances

Eq a => Eq (Result a) Source # 

Methods

(==) :: Result a -> Result a -> Bool #

(/=) :: Result a -> Result a -> Bool #

Show a => Show (Result a) Source # 

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

toMaybe :: Result a -> Maybe a Source #

Convert result to Maybe

new Source #

Arguments

:: Bool

Use in-memory caching

-> FilePath

Directory to use for hard disk storage

-> IO Store

Store

Initialize the store

set :: (Binary a, Typeable a) => Store -> [String] -> a -> IO () Source #

Store an item

get :: (Binary a, Typeable a) => Store -> [String] -> IO (Result a) Source #

Load an item

isMember :: Store -> [String] -> IO Bool Source #

Strict function

delete :: Store -> [String] -> IO () Source #

Delete an item

hash :: [String] -> String Source #

Mostly meant for internal usage