On Jun 25, 2009, at 19:01, Maurí cio wrote:

>> I'm not too familiar with what Cabal provides at the moment. It  
>> can run
>> c2hs and hsc2hs, but we need to use our own c2hs which is quite
>> different. Our build system for one module (=cabal package) currently
>> looks like this:
>>
>> 0. build two mini Haskell programs hierarchyGen and TypeGen
>> 1. using these, generate two .chs files automatically
>> 2. using grep magic, generate dependencies between different .chs
>> modules
>> 3. run c2hs to generate a binary representation of the C header file
>> 4. run c2hs to generate .hs files for each .chs using the binary file
>> from step 3.; generate file according to dependencies
>> (...)
>
>> 2.-4.: This seems to be the major show stopper at the moment. I don't
>> know if we can code this part of the build process using the Cabal  
>> API.
>
> Can such grep magic be made into Haskell functions?

Yes, of course. But it needs somebody who understands how to do this  
all from within Cabal.

> What
> about c2hs, do you think it's possible, just for distribution,
> to pack all c2hs code inside Main module, and call it as
> a library?

I think it is no problem to depend on a tool in a Cabal package. So  
we could have a c2hs-gtk2hs which would be a program only usable by  
Gtk2Hs modules.

Axel.


------------------------------------------------------------------------------
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to