ear7h / dhall-html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dhall-html

A dhall library for generating HTML documents. This simply defines helper functions over the XML package in Prelude

example

-- ./example.dhall
let H = (./package.dhall).HTML
let doc = H.html H.noattr
	[ H.head H.noattr
		[ H.meta (toMap { charset = "utf-8" })
		, H.title H.noattr [ H.text "Hello" ]
		]
	, H.body H.noattr
		[ H.h1 H.noattr [H.text "Hello, World!"]
		, H.p H.noattr [H.text "How about this weather?"]
		]
	]

in H.render doc
$ dhall text --file example.dhall > example.html
$ open example.html

About


Languages

Language:Dhall 100.0%