[C2hs] c2hs + language.c

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Jan 24 15:56:02 EST 2009


On Sat, 2009-01-24 at 21:07 +0100, Benedikt Huber wrote:
> Hello,
> 
> Thanks for considering the patches !

I've pushed them to the darcs repo along with the fix for #11.

> On 24.01.2009, at 19:44, Duncan Coutts wrote:
> > On Sat, 2009-01-24 at 16:57 +0000, Duncan Coutts wrote:
> >> On Wed, 2008-08-20 at 20:49 +0200, Benedikt Huber wrote:
> >>> Hello !
> >>>
> >>> I've set up a branch of c2hs using Language.C's parser and pretty
> >>> printer.
> >>>
> >>>> http://code.haskell.org/~bhuber/c2hs
> >>>
> >>> The branch also fixes a couple of bugs (#6,#8,#9,#12) and, as a  
> >>> small
> >>> bonus, implements "enum define" hooks (Bug #5).
> >>
> >> I've pulled the changes and I'm just trying to get some tests  
> >> running.
> >> You added ./tests/bugs/call_capital/ but I can't seem to make it  
> >> work.
> >> It's looking for a "capital.h" but there's no such file.

> Strange, this test works on my system - there should be a file  
> Capital.h, and in fact, all files should be named Capital.? (with
> capital C).

Capital.c and Capital.chs both #include "capital.h"

Changing both to #include "Capital.h" makes the test work.

> I'm on a case-insensitive filesystem though (sigh), so maybe some
> darcs confusion.

Ah, that'd explain things.

On that topic, Achim has noticed that c2hs currently converts names like
AG_FunctionFoo into functionfoo rather than functionFoo. I sent another
email about that. If you had a moment to check that over I'd very much
appreciate it.

> Could you please review (very small changes) and apply the following  
> patches, too ? Just to ensure c2hs will work with the next release of
> language.c as well (stays compatible with 0.3.1).

Ah, sorry, they depend on the patch:

Fri Aug 15 20:09:07 BST 2008  benedikt.huber at gmail.com
  * Version.hs: add note that this is a patched version using Language.C

which I did not apply since it didn't make sense for the mainline
version.

Would you mind re-sending the patches after pulling the latest patches
from the mainline c2hs repo?

As for the content of the patches it looks fine. What happened to
CAsmExt?


> On 24.01.2009, at 19:58, Achim Schneider wrote:
> > 0.16.0 Lingering Completion, in reference to Language.C?
> Oh, very true and a nice pun, but maybe to obvious ?
> 
> I'd like to suggest 0.16.0 'Crystal Seed'.
> It contains a reference to the environment (it's freezing), C would  
> have been called Crystal if invented after Perl and Ruby, and finally,
> the seed (the C parser) buried in c2hs made it into a library and back
> into c2hs again. Seriously ;)

Done!

Yes it's nice to finally get the C parser back again :-).

BTW, I can't help flinching at names like CDeclExt, CThis, CThat etc
(yes I know they were that way in c2hs originally). Next time you make
an API break would you consider using names designed for qualified
import? like C.DeclExt etc?

Duncan



More information about the C2hs mailing list