Mercurial > gui
view 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 source
class gui = fn t :: Type => fn xcomponent :: Type => t -> xcomponent fun gui_xbody (x:xbody) : xbody = x fun gui_xtable (x:xtable) : xtable = x fun mkGui [t ::: Type] [xcomponent:::Type] (toXml : t -> xcomponent) = 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 *)