diff gui.ur @ 23:7c734edc6301

Merge from Adam.
author Karn Kallio <kkallio@eka>
date Sat, 24 Sep 2011 18:55:27 -0430
parents 554e342665fe
children 5905b56e0cd9
line wrap: on
line diff
--- a/gui.ur	Mon Aug 22 05:06:15 2011 -0430
+++ b/gui.ur	Sat Sep 24 18:55:27 2011 -0430
@@ -1,7 +1,8 @@
-class gui t = t -> xbody
+class gui = fn (t :: Type) (ctx :: {Unit}) => [body ~ ctx] => t -> xml (body ++ ctx) [] []
 
-fun toXml [t ::: Type] (xmlize : gui t) = xmlize
+fun gui_xbody [body ~ []] x = x
+fun gui_xtable [body ~ _] x = x
 
-fun gui_xbody x = x
+fun mkGui [t ::: Type] [ctx ::: {Unit}] (toXml : [body ~ ctx] => t -> xml (body ++ ctx) [] []) = @toXml
 
-fun mkGui [t ::: Type] (toXml : t -> xbody) = toXml
+fun toXml [t ::: Type] [ctx ::: {Unit}] [body ~ ctx] (toXml : gui t ctx) = toXml