diff gui.urs @ 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.urs	Sun Aug 21 11:27:41 2011 -0400
+++ b/gui.urs	Thu Sep 22 19:24:01 2011 +0200
@@ -1,14 +1,21 @@
 (* Gui framework elements common across individual components. *)
 
-class gui
 (* Types of this class describe gui components. *)
+class gui :: Type -> Type -> Type
+ 
 
-val toXml : t ::: Type -> gui t -> t -> xbody
+(* class gui = fn t xcomponent => t -> xcomponent *)
+(* class gui :: Type -> Type -> Type *)
+
+(* How to add components to the gui class. *)
+val mkGui : t ::: Type -> xcomponent:::Type -> (t -> xcomponent) -> gui t xcomponent
+
+(* Xml itself can be a gui component. *)
+val gui_xbody : gui xbody xbody
+
 (* Currently the only thing a gui component can do is be
  * pretty printed to a piece of xml. *)
+val toXml : t ::: Type -> xcomponent ::: Type -> gui t xcomponent -> t -> xcomponent
 
-val gui_xbody : gui xbody
-(* Xml itself can be a gui component. *)
 
-val mkGui : t ::: Type -> (t -> xbody) -> gui t
-(* How to add components to the gui class. *)
+