On 21.04.2010, at 14:33, Andy Stewart wrote: > Axel Simon <axel.si...@in.tum.de> writes: > >> On 21.04.2010, at 12:52, Andy Stewart wrote: >> >>> Hi Axel, >>> >>> I'm testing Embedded demo, and found gtk.cabal >>> hides "Graphics.UI.Gtk.General.Structs", >>> >> >> Yes, I think this is the right thing to do. >> >>> Then i can't call functions `toNativeWindowId` and >>> `fromNativeWindowId`. >>> >>> Maybe we need re-export above two functions in `gtk/Graphics/UI/Gtk/ >>> Embedding/Embedding.hsc`? >> >> Since NativeWindowId is actually an X11 handle to what is a >> DrawWindow in Gtk2Hs, maybe we should >> reexport these two functions from DrawWindow. >> >> In general, I think I would like to remove all exports of enums >> from the individual modules (and >> simply export General/Enums). All other functions should be >> exported from their respective modules. > Yep, That's a cleaner way. > > I'm convert vte package, and got bellow error: > ------------------------------> error start > <------------------------------ > Resolving dependencies... > Configuring vte-0.10.5... > Ensuring that class hierarchy in Graphics/UI/Gtk/Vte/Types.chs is up- > to-date. > Preprocessing library vte-0.10.5... > gtk2hsC2hs: Graphics/UI/Gtk/Vte/Types.chi not found in: > /home/andy/.cabal/lib/pango-0.10.5/ghc-6.12.1 > /usr/local/lib/mtl-1.1.0.2/ghc-6.12.1 > /usr/local/lib/ghc-6.12.1/haskell98-1.0.1.1 > /home/andy/.cabal/lib/gtk-0.10.5/ghc-6.12.1 > /home/andy/.cabal/lib/glib-0.10.5/ghc-6.12.1 > /usr/local/lib/ghc-6.12.1/containers-0.3.0.0 > /home/andy/.cabal/lib/cairo-0.10.5/ghc-6.12.1 > /usr/local/lib/ghc-6.12.1/base-4.2.0.0 > /usr/local/lib/ghc-6.12.1/array-0.3.0.0 > dist/build > . > > cabal: Error: some packages failed to install: > vte-0.10.5 failed during the building phase. The exception was: > ExitFailure 1 > ------------------------------> error end > <------------------------------ > > File `Graphics/UI/Gtk/Vte/Types.chi` should generate under > `vte/dist/build/Graphics/UI/Gtk/Vte`, but nothing. >
Hm, I actually don't know what's happening here. You should try to build with -v. > Just generate file `vte/Graphics/UI/Gtk/Vte/Types.chs`. > And looks incorrect. > Ups, yes, sorry. You also need to define x-Types-Tag: vte which will pick out all types in the hierarchy.list file that have the tag vte. > I have check my `vte.cabal`, haven't found hint. > I missing something? > > Below is my `vte.cabal` and `Types.chs`: You don't need: include-dirs: . -- this is a bit weird: we need to tell Cabal where it finds the .h files -- that are generated by GHC. We need to include CustomStore_stub.h. include-dirs: dist/build cpp-options: -DHAVE_NEW_CONTROL_EXCEPTION in your cabal file. That's gtk specific. Cheers, Axel. ------------------------------------------------------------------------------ _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel