C \(\longrightarrow\) HASKELL, or Yet Another Interfacing Tool

  • Manuel M. T. Chakravarty
Conference paper

DOI: 10.1007/10722298_8

Part of the Lecture Notes in Computer Science book series (LNCS, volume 1868)
Cite this paper as:
Chakravarty M.M.T. (2000) C \(\longrightarrow\) HASKELL, or Yet Another Interfacing Tool. In: Koopman P., Clack C. (eds) Implementation of Functional Languages. IFL 1999. Lecture Notes in Computer Science, vol 1868. Springer, Berlin, Heidelberg


This paper discusses a new method for typed functional languages to access libraries written in a lower-level language. More specifically, it introduces an interfacing tool that eases Haskell access to C libraries. The tool obtains information about the C data type definitions and function signatures by analysing the C header files of the library. It uses this information to compute the missing details in the template of a Haskell module that implements a Haskell binding to the C library. Hooks embedded in the binding file signal where, which, and how C objects are accessed from Haskell. The Haskell code in the binding file determines Haskell type signatures and marshaling details. The approach is lightweight and does not require an extra interface description language.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Manuel M. T. Chakravarty
    • 1
  1. 1.School of Computer Science and EngineeringUniversity of New South WalesSydney

Personalised recommendations