Skip to main content

XHaskell – Adding Regular Expression Types to Haskell

  • Conference paper
Implementation and Application of Functional Languages (IFL 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5083))

Included in the following conference series:

Abstract

We present an extension of Haskell, baptized XHaskell, which combines parametric polymorphism, algebraic data types and type classes found in Haskell with regular expression types, subtyping and regular expression pattern matching found in XDuce. Such an extension proves in particular useful for the type-safe processing of XML data. For example, we can express XQuery and XPath style features via XHaskell combinators. We have implemented the system which can be used in combination with the Glasgow Haskell Compiler.

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 74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.00
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. Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: Proc. of ICFP 2003, pp. 51–63. ACM Press, New York (2003)

    Chapter  Google Scholar 

  2. Bierman, G., Meijer, E., Schulte, W.: The essence of data access in c ω . In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 287–311. Springer, Heidelberg (2005)

    Google Scholar 

  3. Broberg, N., Farre, A., Svenningsson, J.: Regular expression patterns. In: Proc. of ICFP 2004, pp. 67–78. ACM Press, New York (2004)

    Chapter  Google Scholar 

  4. Frisch, A.: OCaml + XDuce. In: Proc. of ICFP 2006, pp. 192–200. ACM Press, New York (2006)

    Chapter  Google Scholar 

  5. Colazzo, D., Castagna, G., Frisch, A.: Error mining for regular expression patterns. In: the 9th Italian Conference On Theoretical Computer Science, pp. 160–172. Springer, Heidelberg (2005)

    Google Scholar 

  6. Gapeyev, V., Pierce, B.C.: Regular object types. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 151–175. Springer, Heidelberg (2003); A preliminary version was presented at FOOL 2003

    Google Scholar 

  7. Ghc as a library, http://www.haskell.org/haskellwiki/GHC/As_a_library

  8. Hall, C.V., Hammond, K., Peyton Jones, S.L., Wadler, P.L.: Type classes in Haskell. ACM Transactions on Programming Languages and Systems 18(2), 109–138 (1996)

    Article  Google Scholar 

  9. Hosoya, H.: Regular expressions pattern matching: a simpler design (2003)

    Google Scholar 

  10. Hosoya, H., Frisch, A., Castagna, G.: Parametric polymorphism for XML. In: Proc. of POPL 2005, pp. 50–62. ACM Press, New York (2005)

    Chapter  Google Scholar 

  11. Hosoya, H., Pierce, B.C.: XDuce: A typed XML processing language (preliminary report). In: Suciu, D., Vossen, G. (eds.) WebDB 2000. LNCS, vol. 1997, pp. 226–244. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  12. Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. In: Proc. of POPL 2001, pp. 67–80. ACM Press, New York (2001)

    Google Scholar 

  13. Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. ACM Trans. Program. Lang. Syst. 27(1), 46–90 (2005)

    Article  Google Scholar 

  14. Kempa, M., Linnemann, V.: Type checking in XOBE. In: Proc. Datenbanksysteme fur Business, Technologie und Web, BTW 2003. LNI, pp. 227–246. GI (2003)

    Google Scholar 

  15. Kirkegaard, C., Møller, A., Schwartzbach, M.I.: Static analysis of XML transformations in Java. IEEE Transaction on Software Engineering 30(3), 181–0_6 (2004)

    Google Scholar 

  16. Kiselyov, O.: HSXML: Typed SXML (2007), http://okmij.org/ftp/Scheme/xml.html#typed-SXML

  17. Kiselyov, O., Lämmel, R.: Haskell’s overlooked object system. Draft; Submitted for journal publication; online since (September 30, 2004); Full version released (September 10, 2005) (2005)

    Google Scholar 

  18. Lu, K.Z.M., Sulzmann, M.: An implementation of subtyping among regular expression types. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 57–73. Springer, Heidelberg (2004)

    Google Scholar 

  19. Meijer, E., Shields, M.: XMλ: A functional language for constructing and manipulating XML documents (Draft) (1999)

    Google Scholar 

  20. Pierce, B.C., Turner, D.N.: Local type inference. ACM Transactions on Programming Languages and Systems 22(1), 1–44 (2000)

    Article  Google Scholar 

  21. Schmidt, U.: Haskell XML Toolbox (2007), http://www.fh-wedel.de/~si/HXmlToolbox

  22. Shields, M., Meijer, E.: Type-indexed rows. In: Proc. of POPL 2001, pp. 261–275. ACM Press, New York (2001)

    Google Scholar 

  23. Stuckey, P.J., Sulzmann, M., Wazny, J.: The Chameleon type debugger. In: Proc. of Fifth International Workshop on Automated Debugging (AADEBUG 2003). Computer Research Repository, pp. 247–258 (2003), http://www.acm.org/corr/

  24. Stuckey, P.J., Sulzmann, M., Wazny, J.: Type processing by constraint reasoning. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 1–25. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  25. Sulzmann, M., Lu, K.Z.M.: XHaskell – adding regular expression types to Haskell. Technical report, National University of Singapore (June 2007), http://www.comp.nus.edu.sg/~sulzmann/manuscript/xhaskell-tr.ps

  26. Sulzmann, M., Wazny, J.: Chameleon, www.comp.nus.edu.sg/sulzmann/chameleon

  27. Thiemann, P.: A typed representation for HTML and XML documents in Haskell. Journal of Functional Programming 12(4-5), 435–468 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  28. Vouillon, J.: Polymorphic regular tree types and patterns. In: Proc. of POPL 2006, pp. 103–114. ACM Press, New York (2006)

    Google Scholar 

  29. Wallace, M., Runciman, C.: Haskell and XML: Generic combinators or type-based translation? In: ICFP 1999, pp. 148–159. ACM Press, New York (1999)

    Chapter  Google Scholar 

  30. Xhaskell, http://xhaskell.googlecode.com

Download references

Author information

Authors and Affiliations

Authors

Editor information

Olaf Chitil Zoltán Horváth Viktória Zsók

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sulzmann, M., Lu, K.Z.M. (2008). XHaskell – Adding Regular Expression Types to Haskell. In: Chitil, O., Horváth, Z., Zsók, V. (eds) Implementation and Application of Functional Languages. IFL 2007. Lecture Notes in Computer Science, vol 5083. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85373-2_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-85373-2_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-85372-5

  • Online ISBN: 978-3-540-85373-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics