| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Heist.TemplateDirectory
Description
This module defines a TemplateDirectory data structure for convenient interaction with templates within web apps.
Synopsis
- data TemplateDirectory (n :: Type -> Type)
- newTemplateDirectory :: forall (n :: Type -> Type). MonadIO n => FilePath -> HeistConfig n -> IO (Either [String] (TemplateDirectory n))
- newTemplateDirectory' :: forall (n :: Type -> Type). MonadIO n => FilePath -> HeistConfig n -> IO (TemplateDirectory n)
- getDirectoryHS :: forall (n :: Type -> Type). MonadIO n => TemplateDirectory n -> IO (HeistState n)
- getDirectoryCTS :: forall (n :: Type -> Type). TemplateDirectory n -> IO CacheTagState
- reloadTemplateDirectory :: forall (n :: Type -> Type). MonadIO n => TemplateDirectory n -> IO (Either String ())
Documentation
data TemplateDirectory (n :: Type -> Type) Source #
Structure representing a template directory.
newTemplateDirectory :: forall (n :: Type -> Type). 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' :: forall (n :: Type -> Type). MonadIO n => FilePath -> HeistConfig n -> IO (TemplateDirectory n) Source #
Creates and returns a new TemplateDirectory, using the monad's fail
function on error.
getDirectoryHS :: forall (n :: Type -> Type). MonadIO n => TemplateDirectory n -> IO (HeistState n) Source #
Gets the HeistState from a TemplateDirectory.
getDirectoryCTS :: forall (n :: Type -> Type). TemplateDirectory n -> IO CacheTagState Source #
Clears the TemplateDirectory's cache tag state.
reloadTemplateDirectory :: forall (n :: Type -> Type). MonadIO n => TemplateDirectory n -> IO (Either String ()) Source #
Clears cached content and reloads templates from disk.