Hi Duncan,

On Thu, 2008-06-19 at 22:59 +0100, Duncan Coutts wrote:

> The bigger change though is that mainline c2hs requires that we use
> withGObject everywhere where as our hacked c2hs adds this inline
> everywhere. So it's this kind of thing:
> 
> -  {# call g_object_set_property #}
> -    (toGObject obj)
> +  withGObject (toGObject obj) $ \objPtr ->
> +    {# call g_object_set_property #}
> +    objPtr
> 
> In the glib package that only crops up in one place but in the gtk
> package we'd have that kind of change on almost every function. We'd
> have to use the code gen to make a change like that across the board.
> 
> Anyway, those are the only changes for glib. Of course with the glib
> package there are not many inter-chs deps so we can get away with a
> linear order. For the gtk package we'll need the proper support in
> Cabal, especially for rebuilds.
> 
> Anyway, one thing it might be worth doing to make the transition to
> using Cabal easier is if we do the change to use mainline c2hs. As I
> say, that'd require updating the code gen and merging lots and lots of
> trivial changes.

As you can imagine, I am not happy about this at all. The thing is that
we have the new signal mechanism lying around for over a year and we
still haven't found time to incorporate the new signals. I had a go at
about 10 files or so (maybe 20) which I admit wasn't too bad, but there
is always the odd one that isn't automatic and that takes a lot of time.
It took a whole evening. (These changes are in my broken darcs
repository, I should really try to recover them.)

I see two other options:
- stick with the home-grown c2hs for all time being
- convince Manuel to incorporate Gtk2Hs-specific stuff into mainstream
c2hs

Both solutions aren't the Right Thing, but it's pragmatic and will save
us about 50 hours of mundane work that does not improve Gtk2Hs itself.

What do you think?

Axel.

> Duncan
> 
> Here's the glib.cabal file:
> 
> name: glib
> version: 0.9.12.2
> license: LGPL
> license-file: COPYING.LIB
> maintainer: [EMAIL PROTECTED]
> stability: provisional
> homepage: http://haskell.org/gtk2hs/
> category: System
> cabal-version: >=1.2
> build-type: Simple
> 
> library
>   build-depends: base
>   pkgconfig-depends: glib-2.0 >= 2.0.0,
>                      gobject-2.0 >= 2.0.0
>   build-tools: c2hs >= 0.15.1
>   includes: glib.h glib-object.h
>   extensions:
>     ForeignFunctionInterface, ExistentialQuantification,
>     FlexibleContexts, PatternSignatures,
>     ScopedTypeVariables, DeriveDataTypeable
>   exposed-modules:
>     System.Glib
>     System.Glib.FFI
>     System.Glib.UTFString
>     System.Glib.Types
>     System.Glib.GType
>     System.Glib.GTypeConstants
>     System.Glib.GValue
>     System.Glib.GValueTypes
>     System.Glib.GParameter
>     System.Glib.StoreValue
>     System.Glib.GObject
>     System.Glib.Properties
>     System.Glib.Attributes
>     System.Glib.GError
>     System.Glib.GList
>     System.Glib.Signals
>     System.Glib.Flags
>     System.Glib.MainLoop
>     System.Glib.GDateTime
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Gtk2hs-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to