NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 ">

The Green Card User's Guide

The Green Card Team

June 2001

This document describes Green Card, a foreign language interface preprocessor for Haskell, version 2.0. It is based on the Green Card paper presented at the '97 Haskell Workshop by Simon Peyton Jones and Thomas Nordin

1. Introduction

A foreign-language interface provides a way for software written in a one language to interact with code written in another. Programming languages that lack foreign-language interfaces die a lingering death.

All Haskell implementations known to us do provide facilities for interfacing to external functionality. For instance, the Glasgow Haskell compiler (GHC) provides a ccall construct for mixing calls to C functions with standard Haskell code performing I/O. However, the mechanism is low-level and it often requires the programmer to write lots of tedious boilerplate code to convert Haskell values into the representations expected by the external function.

We present here Green Card, a preprocessor for Haskell that tries to simplify the task of defining an interface/binding to foreign functionality.