hakyll-4.15.1.0: A static website compiler library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hakyll.Core.Store

Description

A store for storing and retreiving items

Synopsis

Documentation

data Store Source #

Instances

Instances details
Show Store Source # 
Instance details

Defined in Hakyll.Core.Store

Methods

showsPrec :: Int -> Store -> ShowS #

show :: Store -> String #

showList :: [Store] -> ShowS #

data Result a Source #

Result of a store query

Constructors

Found a

Found, result

NotFound

Not found

WrongType TypeRep TypeRep

Expected, true type

Instances

Instances details
Eq a => Eq (Result a) Source # 
Instance details

Defined in Hakyll.Core.Store

Methods

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

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

Show a => Show (Result a) Source # 
Instance details

Defined in Hakyll.Core.Store

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