mustache: A mustache template parser library.

[ bsd3, development, library, program ] [ Propose Tags ]

Allows parsing and rendering template files with mustache markup. See the mustache language reference.

Implements the mustache spec version 1.1.3.

Note: Versions including and beyond 0.4 are compatible with ghc 7.8 again.

[Skip to Readme]
Versions [RSS] [faq],,,,,,,,, 1.0, 1.0.1, 1.0.2, 2.0, 2.0.1, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2 (info)
Change log
Dependencies aeson (<2), base (>=4.7 && <5), bytestring, cmdargs, containers, directory, filepath, mtl (>=2.2.1), mustache, parsec, scientific, template-haskell, text, th-lift, unordered-containers, vector, yaml [details]
License BSD-3-Clause
Copyright (c) 2015 - 2019 Justus Adam
Author Justus Adam
Revised Revision 1 made by justus at 2021-12-10T16:15:43Z
Category Development
Home page
Bug tracker
Source repo head: git clone git://
Uploaded by justus at 2021-11-23T14:50:31Z
Distributions Arch:2.3.2, Debian:2.3.0, Fedora:2.3.1, LTSHaskell:2.3.2, NixOS:2.3.1, Stackage:2.3.2, openSUSE:2.3.1
Executables haskell-mustache
Downloads 23685 total (264 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2021-11-23 [all 2 reports]


  • Text
    • Text.Mustache
      • Text.Mustache.Compile
      • Text.Mustache.Parser
      • Text.Mustache.Render
      • Text.Mustache.Types


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for mustache-2.3.2

[back to package description]

mustache Travis Status Hackage Join the chat at

Haskell implementation of mustache templates.

Implements the official specs version 1.1.3


The old Haskell implementation of mustache templates hastache seemed pretty abandoned to me. This implementation aims to be much easier to use and (fingers crossed) better maintained.

Since it is so easy to use and requires but a few files of code, I've also written a small executable that compiles and renders mustache templates with data input from json or yaml files.



Please refer to the documentation on hackage.

Executable haskell-mustache

$ haskell-mustache --help
Simple mustache template substitution


Common flags:
  -t --templatedirs[=DIRECTORY]  The directory in which to search for the
  -? --help                      Display help message
  -V --version                   Print version information

Current implementation substitutes the TEMPLATE once with each DATA-FILE


$ haskell-mustache my-template-file data-file-1.json data-file-2.json data-file-3.json


  • [x] String parser for mustache templates
  • [x] Template substitution
  • [x] Standalone executable
  • [x] Support for 'set delimiter'
  • [x] More efficiency using Text rather than String
  • [x] More efficient Text parsing
  • [x] Test coverage provided via the official specs
  • [x] Haddock documentation
  • [ ] More instances for ToMustache typeclass