The blazeT package


A true monad (transformer) version of the blaze-markup and blaze-html libraries, implemented as as a very thin wrapper around and strict superset of these libraries.

See Readme on Github.

[Skip to ReadMe]


Versions0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.5
Dependenciesbase (>= && <5), blaze-builder (>=0.2), blaze-html (>=, blaze-markup (>=, bytestring, mtl, text, transformers [details]
AuthorJohannes Gerer
MaintainerJohannes Gerer <>
CategoryText, Data, Web
Home page
Bug tracker
Source repositoryhead: git clone
UploadedWed Oct 26 00:06:00 UTC 2016 by johannesgerer




Maintainers' corner

For package maintainers and hackage trustees

Readme for blazeT-0.0.5

blazeT Build Status

A true monad (transformer) version of the blaze-markup and blaze-html libraries.


While blaze's Markup and Html types have Monad instances and are able to use the concise do notation.


Backwards compatible

The library is intended to serve as a drop-in replacement for the blaze-markup and blaze-html libraries and should be backwards compatible:

Simply replace your module Text.Blaze.* imports with module Text.BlazeT.* and it should give the same results.

For usage of blaze check out their documentation.

Unleash the monads

Implementation Details (from Text.BlazeT.Internals)

Everything build around the simple newtype definition of the MarkupT transformer, which is basically a WriterT transformer writing Blaze.Markup:

newtype MarkupT m a= MarkupT { fromMarkupT :: WriterT B.Markup m a }

Wrappers used to lift all Blaze entities into BlazeT are trivially expressible using basic WriterT class methods:

-- | Wrapping `Blaze.Markup` is simply `WriterT.tell`
wrapMarkupT :: Monad m => B.Markup -> MarkupT m ()
wrapMarkupT = tell

-- | Wrapping functions that modify `Blaze.Markup` is simply  `WriterT.censor`
wrapMarkupT2 ::  Monad m => (B.Markup -> B.Markup)
                 -> MarkupT m a -> MarkupT m a
wrapMarkupT2 = censor