type-of-html: High performance type driven html generation.

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

This library makes most invalid html documents compile time errors and uses advanced type level features to realise compile time computations.

[Skip to Readme]
Versions [faq],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Change log ChangeLog.md
Dependencies base (==4.10.*), text [details]
License BSD-3-Clause
Copyright 2017, Florian Knupfer
Author Florian Knupfer
Maintainer fknupfer@gmail.com
Category Language
Home page https://github.com/knupfer/type-of-html
Source repo head: git clone https://github.com/knupfer/type-of-html
Uploaded by knupfer at 2017-08-04T19:34:45Z
Distributions LTSHaskell:, NixOS:, Stackage:
Downloads 15648 total (14 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for type-of-html-

[back to package description]

Type of html

Type of html is a library for generating html in a highly performant and type safe manner.

Please read the documentation of the module: Html

Note that you need at least ghc 8.2.


Part of the html spec is encoded at the typelevel, turning a lot of mistakes into type errors.


Type of html is normally a lot faster than blaze html. Criterion says about the following snippet that Type of html needs only ~450 ns, blaze html needs ten times more time.

example x =
    ( body_
      ( h1_
        ( img_
        # strong_ "0"
      # div_
        ( div_ "1"
      # div_
        ( form_
          ( fieldset_
            ( div_
              ( div_
                ( label_ "a"
                # select_
                  ( option_ "b"
                  # option_ "c"
                # div_ "d"
              # i_ x
            # button_ (i_ "e")