# HG changeset patch # User Adam Chlipala # Date 1343579326 14400 # Node ID d32fb0f7b137b10f67e593610fdfb46547dbcc41 # Parent b5432d74841a525df207da3675303a47c5458fa6 Update for Ur/Web's new type class handling diff -r b5432d74841a -r d32fb0f7b137 gui.ur --- 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 diff -r b5432d74841a -r d32fb0f7b137 navbar.ur --- 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 [] []) = diff -r b5432d74841a -r d32fb0f7b137 navigation.ur --- 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) diff -r b5432d74841a -r d32fb0f7b137 style.ur --- 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