Safe Haskell | None |
---|
This module defines a TemplateDirectory data structure for convenient interaction with templates within web apps.
- data TemplateDirectory n
- newTemplateDirectory :: MonadIO n => FilePath -> HeistConfig n -> EitherT [String] IO (TemplateDirectory n)
- newTemplateDirectory' :: MonadIO n => FilePath -> HeistConfig n -> IO (TemplateDirectory n)
- getDirectoryHS :: MonadIO n => TemplateDirectory n -> IO (HeistState n)
- getDirectoryCTS :: TemplateDirectory n -> IO CacheTagState
- reloadTemplateDirectory :: MonadIO n => TemplateDirectory n -> IO (Either String ())
Documentation
data TemplateDirectory n Source
Structure representing a template directory.
newTemplateDirectory :: MonadIO n => FilePath -> HeistConfig n -> EitherT [String] IO (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 CacheTagStateSource
Clears the TemplateDirectory's cache tag state.
reloadTemplateDirectory :: MonadIO n => TemplateDirectory n -> IO (Either String ())Source
Clears cached content and reloads templates from disk.