From d64e5adae5cc2f8223da2da42285e1b9124d6ab2 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 21 Oct 2019 19:59:10 +0200 Subject: Simplify tuning --- src/Gtk/Tune.dcl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Gtk/Tune.dcl') diff --git a/src/Gtk/Tune.dcl b/src/Gtk/Tune.dcl index 63ad69d..b970659 100644 --- a/src/Gtk/Tune.dcl +++ b/src/Gtk/Tune.dcl @@ -4,10 +4,13 @@ from Gtk.State import :: StateT, :: Identity, :: State, :: GtkState, :: GtkM from Gtk.Types import :: GtkCSSClass, :: GtkMargins from Gtk.Widgets import :: GtkWidget, class gtkWidget -class tune elem option :: !(GtkM elem) !option -> GtkM elem +class tune elem option :: !option !elem -> GtkM elem -(<<@) infixl 2 -(<<@) elem option :== tune elem option +instance tune elem (oa,ob) | tune elem oa & tune elem ob +instance tune elem (oa,ob,oc) | tune elem oa & tune elem ob & tune elem oc +instance tune elem (oa,ob,oc,od) | tune elem oa & tune elem ob & tune elem oc & tune elem od + +(<<@) infixl 2 :: !(GtkM elem) !option -> GtkM elem | tune elem option instance tune w GtkMargins | gtkWidget w instance tune w GtkCSSClass | gtkWidget w -- cgit v1.2.3