Hi Brian, On 12/08/13 03:52, bri...@aracnet.com wrote: ... > Couldn't match expected type ... > Gtk.on Gtk.exposeEvent glCanvas $ \ _ -> putStrLn "foo" ... > I looked up the type of Gtk.on and exposeEvent : ... > on > :: object > -> Signal object callback -> callback -> IO (ConnectId object) ...
I think you have the arguments flipped, try: Gtk.on glCanvas Gtk.exposeEvent $ \_ -> ... As for explaining the types - as I understand it, you have an object and a callback, and the Signal associates the object with the callback for a specific event type. The type variables occur more than once in the whole type for safety: the right type of callback must be provided for the event type, and the object must support the event type too. Claude -- http://mathr.co.uk _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe