status of GreenCard support

Peter Tanski p.tanski at
Tue Feb 27 00:40:17 EST 2007

> Jefferson Heard wrote:
>> some simple fix that would make code generated by GreenCard work,  
>> or is there
>> some alternative tool that will make it work?  What's the status  
>> of C2HS?

Marc Weber wrote:
> When using cabal and GreenCard it might be the case that you have to
> tweak setup.hs to add --libdir parameters. Probably it would be better
> to update cabal. Maybe I've missed a point to configure it correctly?
> If I can save you some minutes by dropping you me quick setup.hs hack
> let me know it.

I should have answered this in before, sorry.  GHC has not supported  
GreenCard since version 6.2.  See 

I ran into that problem while attempting to get gcjni-1.2 to work  
with GHC 6.4 awhile ago, got annoyed, and appended the warning to the  
Haskell Wiki page lest others ran into the same problem.  The  
Alastair Reid's successor to GreenCard, based on Template Haskell,  
hasn't been finished yet (or perhaps it is dead?).  For more  
automatic configuration, you might consider Template Haskell: see Ian  
Lynagh's "Template Haskell: A Report From the Field", at http:// .

There are still configuration parameters in the GHC build system for  
GreenCard but from what I have seen of the rest it seems that you  
would have to write your own support for the old _casm_ ffi bindings  
back into the source code practically from scratch (perhaps grabbing  
an archive of 6.1 would give you a better start).

Peter Tanski

More information about the Glasgow-haskell-users mailing list