comparison 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
comparison
equal deleted inserted replaced
17:2947170fcfd6 18:16447dc6a68c
1 class gui t = t -> xbody 1 class gui = fn t :: Type => fn xcomponent :: Type => t -> xcomponent
2 2
3 fun toXml [t ::: Type] (xmlize : gui t) = xmlize 3 fun gui_xbody (x:xbody) : xbody = x
4 fun gui_xtable (x:xtable) : xtable = x
4 5
5 fun gui_xbody x = x 6 fun mkGui [t ::: Type] [xcomponent:::Type] (toXml : t -> xcomponent) = toXml
6 7
7 fun mkGui [t ::: Type] (toXml : t -> xbody) = toXml 8 fun toXml [t:::Type] [xcomponent ::: Type] (xmlize: gui t xcomponent) = xmlize
9
10 (* class gui t = t -> xbody *)
11
12 (* fun toXml [t ::: Type] (xmlize : gui t) = xmlize *)
13
14 (* fun gui_xbody x = x *)
15
16 (* fun mkGui [t ::: Type] (toXml : t -> xbody) = toXml *)