HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulestache-2.3.4Haskell2010

Text.Mustache.Compile

Mustache Template creation from file or a Text value. You don't usually need to import the module, because Text.Mustache re-exports everything you may need, import that module instead.

  • 7 values
  • Packagestache-2.3.4
  • Exports7
  • LanguageHaskell2010
  • LicenceMIT
  • SourceCompile.hs
valuecompileMustacheDir
  1. :: MonadIO m
  2. => PName

    Which template to select after compiling

  3. -> FilePath

    Directory with templates

  4. -> m Template

    The resulting template

#

Compile all templates in the specified directory and select one. Template files should have the extension mustache, (e.g. foo.mustache) to be recognized. This function does not scan the directory recursively.

Note that each template/partial will get an identifier which consists of the name of corresponding template file with extension .mustache dropped. This is important for e.g. selecting active template after loading (the first argument).

The action can throw MustacheParserException and the same exceptions as getDirectoryContents, and readFile.

compileMustacheDir = complieMustacheDir' isMustacheFile