[Haskell-cafe] Re: [C2hs] anyone interested in developing a Language.C library?

Josef Svenningsson josef.svenningsson at gmail.com
Sat Apr 21 06:04:57 EDT 2007

On 4/21/07, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> chak:
> > Duncan Coutts wrote:
> > >If anyone is interested in developing a Language.C library, I've just
> > >completed a full C parser which we're using in c2hs.
> > >
> > >It covers all of C99 and all of the GNU C extensions that I have found
> > >used in practise, including the __attribute__ annotations. It can
> > >successfully parse the whole Linux kernel and all of the C files in all
> > >the system packages on my Gentoo installation.
> >
> > Great work!
> >
> > Using this as a basis for a Language.C would be a really worthwile project.
> >
> I think people should be very interested in this.
> The ability to easily manipulate and generate C would quickly insert
> Haskell into another useful niche. There must *surely* be real money
> in writing nice Haskell programs that optimise/analyse/refactor/generate
> C code...
Unfortunately the niche is not empty. There is an ocaml library called
cil which is supposed to be pretty sweet for manipulating C code. But
I still think a Haskell library would be a very good idea, and perhaps
one can look at cil for inspiration.

cil can be found here:



More information about the Libraries mailing list