heist-1.0.1.2: An Haskell template system supporting both HTML5 and XML.

Safe HaskellNone
LanguageHaskell98

Heist.TemplateDirectory

Description

This module defines a TemplateDirectory data structure for convenient interaction with templates within web apps.

Synopsis

Documentation

data TemplateDirectory n Source #

Structure representing a template directory.

newTemplateDirectory :: MonadIO n => FilePath -> HeistConfig n -> IO (Either [String] (TemplateDirectory n)) Source #

Creates and returns a new TemplateDirectory wrapped in an Either for error handling.

newTemplateDirectory' :: MonadIO n => FilePath -> HeistConfig n -> IO (TemplateDirectory n) Source #

Creates and returns a new TemplateDirectory, using the monad's fail function on error.

getDirectoryHS :: MonadIO n => TemplateDirectory n -> IO (HeistState n) Source #

Gets the HeistState from a TemplateDirectory.

getDirectoryCTS :: TemplateDirectory n -> IO CacheTagState Source #

Clears the TemplateDirectory's cache tag state.

reloadTemplateDirectory :: MonadIO n => TemplateDirectory n -> IO (Either String ()) Source #

Clears cached content and reloads templates from disk.