Hi Axel, Axel Simon <axel.si...@in.tum.de> writes:
> Hi Andy, > > On 22.04.2010, at 09:13, Andy Stewart wrote: > >> >> Because WebKit need below modules: >> Graphics.UI.Gtk.General.DNDTypes >> Graphics.UI.Gtk.General.Threading >> Graphics.UI.Gtk.Types >> So i push new patches to make gtk.cabal expose those modules. > > This can't work for a very technical reason in the Setup.hs file: No internal > .chs module may depend > on any exposed .chs module. Moving Types.chs from the internal list to the > exposed module list > violates this. What do you need from these modules? > Maybe we should create an exposed module Graphics.UI.Gtk.Internals that > re-exports certain types > that normal users should not touch. MyLib.Signal.chs need "Graphics.UI.Gtk.General.Threading". WebView.chs need `Graphics.UI.Gtk.General.DNDTypes` with `mkTargetList`. And i have check WebFrame.chs, infact, it don't need `Gtk.Types`, `WebKit.Types` is enough. The real trouble is `{#import Graphics.UI.Gtk.Types#}` in `WebKit.Tyeps.chs`, WebKit.Types.chs can't compile if you hidden "Gtk.Types" in gtk.cabal. You will got error like below: ------------------------------> error start <------------------------------ Graphics/UI/Gtk/WebKit/Types.chs:116:7: Could not find module `Graphics.UI.Gtk.Types': It is a member of the hidden package `gtk-0.10.1'. Perhaps you need to add `gtk' to the build-depends in your .cabal file. it is a hidden module in the package `gtk-0.10.5' Use -v to see a list of the files searched for. ------------------------------> error end <------------------------------ > > I would really like to keep Types hidden and re-export all entities relating > to a specific type from > that module. Thus, we would need to add castToScreen, gTypeScreen to Screen. > The module > Graphics.UI.Gtk.Internals could then simply re-export all of Types. This > would ensure that normal > users who import Graphics.UI.Gtk do not get mkScreen and unScreen but they > would get gTypeScreen > and castToScreen. Yes, that's sound good. `toFoo` and `castToFoo` always help, and `mkFoo` `unFoo` is not useful to end user. And i found you hide below modules: Graphics.UI.Gtk.General.Enums Graphics.UI.Gtk.General.DNDTypes Graphics.UI.Gtk.Multiline.Types Thoses Types.chs file not generated by c2hs, maybe we need change name to `Internal`, such as Multiline.Internal, or we need re-export those modules. Please let me know when you finish re-export work, i will adjust my patches. Cheers, -- Andy ------------------------------------------------------------------------------ _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel