Publications

Plugging Haskell In

AndrÈ Pang, Don Stewart, Sean Seefried, and Manuel M. T. Chakravarty.

Submitted to the 2004 Haskell Workshop.

Abstract

Extension languages enable users to expand the functionality of an application without touching its source code. Commonly, these languages are dynamically typed languages, such as Lisp, Python, or domain-specific languages, which support runtime plugins via dynamic loading of components. We show that Haskell can be comfortably used as a statically typed extension language, and that it can support type-safe dynamic loading of plugins using dynamic types. Moreover, we discuss how plugin support is especially useful to applications where Haskell is used as an embedded domain-specific language (EDSL). We explain how to realise type-safe plugins using dynamic types, runtime compilation, and dynamic linking, exploiting infrastructure provided by the Glasgow Haskell Compiler. We demonstrate the practicability of our approach with several applications that serve as running examples.

Download

The paper’s official website, where you can download the hs-plugins library and example programs, is at http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/.

12 pages: Postscript (.ps.gz), Adobe Acrobat PDF. The copyright for the papers is held by the authors or by the publisher. The papers are provided for personal use only; other use requires the explicit permission of the copyright holder.

BibTeX Entry

@inproceedings{PSSC04,
 author = {Andr{\'e} Pang and Don Stewart and Sean Seefried and Manuel M. T. Chakravarty},
 title = {Plugging Haskell in},
 booktitle = {Proceedings of the ACM SIGPLAN workshop on Haskell},
 year = {2004},
 isbn = {1-58113-850-4},
 pages = {10--21},
 location = {Snowbird, Utah, USA},
 doi = {http://doi.acm.org/10.1145/1017472.1017478},
 publisher = {ACM Press},
}

Related Webpages

Comments

Interfacing Haskell to Object-Oriented Languages

AndrÈ T. H. Pang and Manuel M. T. Chakravarty

In Greg Michaelson and Phil Trinder, editors, IFL 2003 - 15th International Workshop on the Implementation of Functional Languages, LNCS, Springer-Verlag, 2004.

Abstract

The interfacing of object-oriented languages with functional languages, in general, and with Haskell, in particular, has received a considerable amount of attention. Previous work, including Lambada, a Haskell to Java bridge, showed how an object-oriented class hierarchy can be modeled using Haskell type classes, such that Java libraries can be used conveniently from Haskell.

The present paper extends this previous work in two major directions. Firstly, we describe a new implementation of object-oriented style method calls and overloading in Haskell, using multi-parameter type classes and functional dependencies. This enables calling of a foreign object’s methods in a syntactically convenient, type-safe manner. Secondly, we sketch an approach to automating the generation of library bindings using compile-time meta-programming for object-oriented frameworks featuring reflection. We have evaluated the practicality of our approach by implementing a Haskell binding to the Objective-C language on the Mac OS X platform.

Download

16 pages: Postscript (.ps.gz), Adobe Acrobat PDF. The copyright for the papers is held by the authors or by the publisher. The papers are provided for personal use only; other use requires the explicit permission of the copyright holder.

Related Webpages

Comments

ABC CMWeb Installation Overview

S. Pfeiffer, C. Parker, A. Pang, “ABC CMWeb Installation Overview”, Technical Report, CSIRO Mathematical and Information Sciences No. 03/177, September 2003.

Comments