implementation module Gtk.Tune import StdEnv import Control.Applicative import Control.Monad import Gtk instance tune elem (oa,ob) | tune elem oa & tune elem ob where tune (a,b) elem = tune a elem >>= tune b instance tune elem (oa,ob,oc) | tune elem oa & tune elem ob & tune elem oc where tune (a,b,c) elem = tune a elem >>= tune b >>= tune c instance tune elem (oa,ob,oc,od) | tune elem oa & tune elem ob & tune elem oc & tune elem od where tune (a,b,c,d) elem = tune a elem >>= tune b >>= tune c >>= tune d (<<@) infixl 2 :: !(GtkM elem) !option -> GtkM elem | tune elem option (<<@) elemf option = elemf >>= tune option instance tune w GtkMargins | gtkWidget w where tune margins widget = setMargins margins widget instance tune w GtkCSSClass | gtkWidget w where tune cls widget = addCSSClass cls widget