Mercurial > gui
diff gui.ur @ 18:16447dc6a68c
Introduction of multi-parameter type class for gui components
author | Ron de Bruijn <rmbruijn@gmail.com> |
---|---|
date | Thu, 22 Sep 2011 19:24:01 +0200 |
parents | 90be8b8917d5 |
children | 554e342665fe |
line wrap: on
line diff
--- a/gui.ur Sun Aug 21 11:27:41 2011 -0400 +++ b/gui.ur Thu Sep 22 19:24:01 2011 +0200 @@ -1,7 +1,16 @@ -class gui t = t -> xbody +class gui = fn t :: Type => fn xcomponent :: Type => t -> xcomponent -fun toXml [t ::: Type] (xmlize : gui t) = xmlize +fun gui_xbody (x:xbody) : xbody = x +fun gui_xtable (x:xtable) : xtable = x -fun gui_xbody x = x +fun mkGui [t ::: Type] [xcomponent:::Type] (toXml : t -> xcomponent) = toXml -fun mkGui [t ::: Type] (toXml : t -> xbody) = toXml +fun toXml [t:::Type] [xcomponent ::: Type] (xmlize: gui t xcomponent) = xmlize + +(* class gui t = t -> xbody *) + +(* fun toXml [t ::: Type] (xmlize : gui t) = xmlize *) + +(* fun gui_xbody x = x *) + +(* fun mkGui [t ::: Type] (toXml : t -> xbody) = toXml *)