Hi Norbert -- These two changes (exporting Allocation + eta-reducing EventM) are now pushed to the repo. Thanks for the suggestions.
~d Excerpts from Norbert Zeh's message of 2014-10-30 04:07:42 -0700: > Thanks. I just added the export to Widget and manually compiled it here. > I also changed the type definition of EventM as pointed out in an earlier > message I sent. This bug is still present in the current version of > gtk2hs. To elaborate: With the current definition of EventM > > type EventM t a = ReaderT (Ptr t) IO a > > it is impossible to use (EventM t) as an argument to a monad transformer, > e.g. > > type EventMWithState t a = StateT MyState (EventM t) a. > > There are two ways to make this possible. Either EventM becomes a newtype, > along with the necessary boilerplate. That's probably not necessary here. > The second option is to define > > type EventM t = ReaderT (Ptr t) IO. > > This allows (EventM t) to be combined with monad transformers. > > Cheers, > Norbert > > On Thu, Oct 30, 2014 at 3:32 AM, Axel Simon <axel.si...@in.tum.de> wrote: > > > Hi Norbert, > > > > On 29.10.2014, at 22:37, Norbert Zeh <n...@cs.dal.ca> wrote: > > > > > Hi folks, > > > > > > I just tried to connect to the sizeAllocate signal of the Widget type, > > but the type of this signal is Signal self (Allocation -> IO ()). Thus, > > the function I provide as an argument needs to take an Allocation as an > > argument, but I cannot declare a function of this type because Allocation > > seems to be only exported by the hidden module > > Graphics.UI.Gtk.General.Structs. Any advice on how to react to > > sizeAllocate signals? > > > > > > > Well, it’s a bug, it should be exported from Widget. However, it’s only a > > type synonym to Rectangle which is public, so using the Rectangle > > constructor should be possible. > > > > Cheers, > > Axel > > > > > Thanks, > > > Norbert > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > > > Gtk2hs-devel mailing list > > > Gtk2hs-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel > > > > ------------------------------------------------------------------------------ _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel