changeset 32:d32fb0f7b137

Update for Ur/Web's new type class handling
author Adam Chlipala <adam@chlipala.net>
date Sun, 29 Jul 2012 12:28:46 -0400
parents b5432d74841a
children 2e7f8f7d71d4
files gui.ur navbar.ur navigation.ur style.ur
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gui.ur	Sat Jul 21 10:15:14 2012 -0400
+++ b/gui.ur	Sun Jul 29 12:28:46 2012 -0400
@@ -1,4 +1,4 @@
-class gui = fn (t :: Type) (ctx :: {Unit}) => [[Dyn] ~ ctx] => t -> xml ([Dyn] ++ ctx) [] []
+con gui (t :: Type) (ctx :: {Unit}) = [[Dyn] ~ ctx] => t -> xml ([Dyn] ++ ctx) [] []
 
 fun gui_xbody [[Dyn] ~ _] x = x
 fun gui_xtable [[Dyn] ~ _] x = x
--- a/navbar.ur	Sat Jul 21 10:15:14 2012 -0400
+++ b/navbar.ur	Sun Jul 29 12:28:46 2012 -0400
@@ -13,7 +13,7 @@
 type build = unit
 type print = unit
 
-class mode t = navBar t -> xbody
+con mode t = navBar t -> xbody
 
 (* The case of special treatment for the last one seems common in themes. *)
 fun mapXLast [a ::: Type] [ctx ::: {Unit}] (f : a -> bool -> xml ctx [] []) (ls : list a) : (xml ctx [] []) =
--- a/navigation.ur	Sat Jul 21 10:15:14 2012 -0400
+++ b/navigation.ur	Sun Jul 29 12:28:46 2012 -0400
@@ -19,7 +19,7 @@
     con linkLs :: {Unit} -> Type = fn r :: {Unit} => $(mapU (option navItem) r)
     con msgLs :: {Unit} -> Type = fn r :: {Unit} => $(mapU (option xbody) r)
 
-    class shape t = t -> $(mapU xbody M.navbarPos) 
+    con shape t = t -> $(mapU xbody M.navbarPos) 
 
     val shape_npos : shape $(mapU xbody M.navbarPos) = (fn x => x)
 
--- a/style.ur	Sat Jul 21 10:15:14 2012 -0400
+++ b/style.ur	Sun Jul 29 12:28:46 2012 -0400
@@ -1,4 +1,4 @@
-class attr t = t -> css_value
+con attr t = t -> css_value
 val attr_string = atom
 fun attr_int n = atom (show n)
 val attr_url = css_url