Modeling HTML in Haskell

  • Authors:
  • Peter Thiemann

  • Affiliations:
  • -

  • Venue:
  • PADL '00 Proceedings of the Second International Workshop on Practical Aspects of Declarative Languages
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

We define HTML as an embedded domain specific language in Haskell. To this end, we have designed and implemented a combinator library which provides the means to create and modify HTML elements. Haskell's type classes are employed to enforce well-formed HTML to a large degree. Haskell can then be used as a meta language to map structured documents to HTML, to define conditional content, to extract information from the documents, or to define entire web sites. We introduce container-passing style as a programming convention for the library. We also pinpoint some shortcomings of Haskell's type system that make the task of this library's implementor tedious.