view 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 source
(* Gui framework elements common across individual components. *)

(* Types of this class describe gui components. *)
class gui :: Type -> Type -> Type
 

(* 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