Skip to main content

Modeling HTML in Haskell

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1753))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Per Bjesse, Koen Claessen, Mary Sheeran, and Satnam Singh. Lava: Hardware design in Haskell. In Paul Hudak, editor, Proc. International Conference on Functional Programming 1998, pages 174–184, Baltimore, USA, September 1998. ACM Press, New York.

    Chapter  Google Scholar 

  2. Tim Bray, Jean Paoli, and C.M. Sperberg-MacQueen. Extensible markup language (xml) 1.0 (w3c recommendation). http://www.w3.org/TR/REC-xml, feb 1998.

  3. Daniel Cabeza and Manuel Hermenegildo. Www programming using computational logic systems (and the PiLLoW/CIAO library). http://www.clip.dia.fi.upm.es/Software/pillow/pillow/_www6/pillow/_www6.h%tml, March 1997.

  4. Allaire Corp. HomeSite. http://www.allaire.com/.

  5. Ralf S. Engelschall. Website meta language (wml). http://www.engelschall.com/sw/wml/.

  6. Haskell98, a non-strict, purely functional language. http://www.haskell.org, December 1998.

  7. John E. Hopcroft and Jeffrey D. Ullman. Introduction to automata theory, languages and computation. Addison-Wesley, 1979.

    Google Scholar 

  8. John Hughes. Generalising monads to arrows. Science of Computer Programming, 1999. To appear.

    Google Scholar 

  9. SoftQuad Software Inc. HoTMetaL. http://www.softquad.com/.

  10. Mark P. Jones. A theory of qualified types. In Bernd Krieg-Brückner, editor, Proc. 4th European Symposium on Programming’ 92, volume 582 of Lecture Notes in Computer Science, pages 287–306, Rennes, France, February 1992. Springer-Verlag.

    Google Scholar 

  11. Mark P. Jones. Gofer, Functional Programming Environment, June 1994. Version 2.30.

    Google Scholar 

  12. Mark P. Jones. Hugs Online — embracing functional programming. http://www. haskell.org/hugs/, June 1999.

  13. Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In Proc. 22nd Annual ACM Symposium on Principles of Programming Languages, pages 333–343, San Francisco, CA, January 1995. ACM Press.

    Google Scholar 

  14. Seng Wai Loke and Andrew Davison. Logic programming with the World-Wide Web. pages 235–245, Washington DC, USA, mar 1996.

    Google Scholar 

  15. Konstantin Läufer. Type classes with existential types. Journal of Functional Programming, 6(3):485–517, May 1996.

    Article  MATH  MathSciNet  Google Scholar 

  16. Konstantin Läufer and Martin Odersky. An extension of ML with first-class abstract types. In Proc. ACM SIGPLAN Workshop on ML and its Applications, pages 78–91, San Francisco, CA, June 1992.

    Google Scholar 

  17. John Matthews, John Launchbury, and Byron Cook. Microprocessor specification in Hawk. In IEEE International Conference on Computer Languages, ICCL 1998, Chicago, USA, May 1998. IEEE Computer Society Press.

    Google Scholar 

  18. Erik Meijer. Server-side web scripting with Haskell. Journal of Functional Programming, 1999. To appear.

    Google Scholar 

  19. Microsoft. Microsoft Frontpage98. http://www.microsoft.com/frontpage.

  20. NetObjects Fusion. http://www.netobjects.com.

  21. J. K. OusterHout. Tcl and the Tk Toolkit. Addison-Wesley, 1994.

    Google Scholar 

  22. PC Magazine. Web authoring tools. http://www.zdnet.com/pcmag/features/htmlauthor//_open.htm, January 20 1998.

  23. John Punin and Mukkai Krishnamoorthy. ASHE (a simple HTML editor) — xhtml. http://www.cs.rpi.edu/~puninj/ASHE/ URL }, November 1996.

    Google Scholar 

  24. Didier Rémy. Typing record concatenation for free. In Proc. 19th Annual ACM Symposium on Principles of Programming Languages, pages 166–176, Albuquerque, New Mexico, January 1992. ACM Press.

    Google Scholar 

  25. Internet Software Technologies. HTMLed Pro32. http://www.ist.ca.

  26. Texinfo. http://texinfo.org.

  27. Ton Vullinghs, Wolfram Schulte, and Thilo Schwinn. The design of a functional GUI library using constructor classes. In PSI-96: Andrei Ershov Second International Memorial Conference, Perspectives of System Informatics, volume 1181 of Lecture Notes in Computer Science, pages 398–408, Novosibirsk, Russia, June 1996. Springer-Verlag.

    Google Scholar 

  28. Ton Vullinghs, Daniel Tuijnman, and Wolfram Schulte. Lightweight GUIs for functional programming. In Doaitse Swierstra and Manuel Hermenegildo, editors, International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’ 95), volume 982 of Lecture Notes in Computer Science, pages 341–356, Utrecht, The Netherlands, September 1995. Springer-Verlag.

    Chapter  Google Scholar 

  29. Malcolm Wallace and Colin Runciman. Haskell and XML: Generic combinators or type-based translation? pages 148–259.

    Google Scholar 

  30. Mitchell Wand. Type inference for record concatenation and multiple inheritance. In Proc. of the 4th Annual Symposium on Logic in Computer Science, pages 92–97, Pacific Grove, CA, June 1989. IEEE Computer Society Press. To appear in Information and Computation.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Thiemann, P. (1999). Modeling HTML in Haskell. In: Pontelli, E., Santos Costa, V. (eds) Practical Aspects of Declarative Languages. PADL 2000. Lecture Notes in Computer Science, vol 1753. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46584-7_18

Download citation

  • DOI: https://doi.org/10.1007/3-540-46584-7_18

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66992-0

  • Online ISBN: 978-3-540-46584-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics