annotate 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
rev   line source
kkallio@8 1 (* Gui framework elements common across individual components. *)
kkallio@8 2
kkallio@8 3 (* Types of this class describe gui components. *)
rmbruijn@18 4 class gui :: Type -> Type -> Type
rmbruijn@18 5
kkallio@8 6
rmbruijn@18 7 (* class gui = fn t xcomponent => t -> xcomponent *)
rmbruijn@18 8 (* class gui :: Type -> Type -> Type *)
rmbruijn@18 9
rmbruijn@18 10 (* How to add components to the gui class. *)
rmbruijn@18 11 val mkGui : t ::: Type -> xcomponent:::Type -> (t -> xcomponent) -> gui t xcomponent
rmbruijn@18 12
rmbruijn@18 13 (* Xml itself can be a gui component. *)
rmbruijn@18 14 val gui_xbody : gui xbody xbody
rmbruijn@18 15
kkallio@8 16 (* Currently the only thing a gui component can do is be
kkallio@8 17 * pretty printed to a piece of xml. *)
rmbruijn@18 18 val toXml : t ::: Type -> xcomponent ::: Type -> gui t xcomponent -> t -> xcomponent
kkallio@8 19
kkallio@8 20
rmbruijn@18 21