HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Web.Template.Internal

Synopsis
  • Packagehakyll-4.17.0.0
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs
datadata Template

Datatype used for template substitutions.

Instances7Eq, Show, IsString, Generic, Binary, Writable, …
valueloadAndApplyTemplate
  1. :: Identifier

    Template identifier

  2. -> Context a

    Context

  3. -> Item a

    Page

  4. -> Compiler (Item String)

    Resulting item

The following pattern is so common:

tpl <- loadBody "templates/foo.html"
someCompiler
    >>= applyTemplate tpl context

That we have a single function which does this:

someCompiler
    >>= loadAndApplyTemplate "templates/foo.html" context