Optimize static parts of type-of-html. https://github.com/knupfer/type-of-html-static

Latest on Hackage:

See all snapshots type-of-html-static appears in

BSD-3-Clause licensed by Florian Knupfer
Maintained by [email protected]

Module documentation for

This version can be pinned in stack with:[email protected]:3c7560841d699a3454fb32a5365e501fa14a9d5ffebb67e3b784a9b34806690c,1559

Type of html static

This little companion library of [https://hackage.haskell.org/package/type-of-html](Type of html) provides just two little functions: static :: Document a => a -> Q Exp. Using this template haskell function on any part of your html document will escape, render and lift to a Symbol at compile time.

It increases performance a lot by avoiding any runtime computation. By producing Proxy Symbol, it will fuse at compiletime with adjacent elements in your document.

optimize :: Q Exp -> Q Exp takes a quoted definition of a html document and tries to convert all literals to compile time escaped Proxy Symbol. It is less powerfull than static but more convenient.


Revision history for type-of-html-static


  • first draft