[Haskell-cafe] Re: CPP, Leopard and Haskell Objective-C bindings

Wolfgang Thaller wolfgang.thaller at gmx.net
Tue Nov 6 13:57:33 EST 2007

On 6-Nov-07, at 5:00 PM, Joel Reymont wrote:

> It seems that the current approach taken by HOC is to strip  
> preprocessing directives.

True. Additionally, some of those strange macros are just interpreted  
as language keywords by the parser.

> I'm trying to figure out the easiest way to run CPP over the header  
> files before processing them in HOC.

That is not exactly what we want, I think. Currently, HOC parses  
things file-by-file, so we do NOT want to follow #include directives.  
We might just process the line pragmas from CPP to keep track of where  
things came from, OTOH.

> Is there a CPP written in Haskell and packaged as a library?

There is "cpphs".

As a quick solution, I'd say we run the HOC InterfaceGenerator over  
the 10.4 SDK in /Developer/SDKs/ (which has all the "old" headers).

I'm still working on cleaning up my InterfaceGenerator rewrite (I  
didn't have enough time to finihs last weekend, so maybe next weekend,  
but at least I'm motivated now). I think any more more elaborate  
improvements to the interface generator should be based on that  
instead of my old code.



More information about the Haskell-Cafe mailing list