O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

The blaze-html library is derived from blaze, an amazingly fast text builder library that constructs text data in chunks. The blaze-html library provides a DSL for representing HTML. In fact, it provides three HTML DSLs-- HTML5, HTML4 (Strict and Transitional), and XHTML.

All of them offer a monadic way of combining different HTML elements and creating an HTML as a structure represented by data type Html (an alias of Markup). Once created, one can render the Html element using different renderers (such as Pretty, String, Text, and Utf8).

The Html data type itself is an alias of Text.Blaze.Internal.Markup. Using Markup, it is possible to create custom HTML elements.

One of the important things to note in the recipe is how smoothly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required