type-of-html-static: Optimize static parts of type-of-html.

[ bsd3, html, language, library, text, web ] [ Propose Tags ]

This library provides the TH-function static to annote which parts of your page are static to dramatically increase performance. It converts and escapes it's argument at compiletime and lifts it to a Proxy Symbol to avoid even appending of Builder.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.1, 0.1.0.2
Change log ChangeLog.md
Dependencies base (>=4.9 && <5), template-haskell, type-of-html [details]
License BSD-3-Clause
Copyright 2018, Florian Knupfer
Author Florian Knupfer
Maintainer fknupfer@gmail.com
Category Language, Text, Web, HTML
Home page https://github.com/knupfer/type-of-html-static
Source repo head: git clone https://github.com/knupfer/type-of-html-static
Uploaded by knupfer at 2018-05-02T10:15:13Z
Distributions LTSHaskell:0.1.0.2, Stackage:0.1.0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1439 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-05-02 [all 1 reports]

Readme for type-of-html-static-0.1.0.2

[back to package description]

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.