package tyxml-ppx

  1. Overview
  2. Docs
PPX that allows to write TyXML documents with the HTML syntax

Install

Dune Dependency

Authors

Maintainers

Sources

tyxml-4.3.0.tbz
sha256=6e1bd76b184eb8bf43550138fa1e14f03b5761187ff38891179a36bdddbdbfc3
md5=fd834a567f813bf447cab5f4c3a723e2

Description

open Tyxml
let%html to_ocaml = "<a href='ocaml.org'>OCaml!</a>"

The TyXML PPX is compatible with all TyXML instance, from textual trees to reactive virtual DOM trees.

Published: 19 Nov 2018

README

TyXML

TyXML is a library for building statically correct HTML5 and SVG documents:

open Tyxml
let to_ocaml = Html.(a ~a:[a_href "ocaml.org"] [txt "OCaml!"])

Tyxml can also be used with the standard HTML syntax, using the PPX:

open Tyxml
let%html to_ocaml = "<a href='ocaml.org'>OCaml!</a>"

TyXML provides a set of combinators. These combinators use the OCaml type system to ensure the validity of the generated document. They are used in various libraries, such as Eliom and Js_of_ocaml.

The documentation can be consulted on the TyXML website. Examples are available in the examples directory.

Installation

TyXML is available in OPAM:

opam install tyxml

To install the PPX:

opam install tyxml-ppx

Dependencies (5)

  1. ppx_tools_versioned
  2. markup >= "0.7.2"
  3. tyxml = version
  4. dune
  5. ocaml >= "4.02"

Dev Dependencies (1)

  1. alcotest with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.