# HG changeset patch # User Adam Chlipala # Date 1308833043 14400 # Node ID d65387bdc55774a2852dd3452784902337b04c48 # Parent 3bef8d50b4d63a2598b2e5eaa21b69a78377b7cd 'show' instance for 'css_class' diff -r 3bef8d50b4d6 -r d65387bdc557 lib/ur/basis.urs --- a/lib/ur/basis.urs Wed Jun 22 13:58:43 2011 -0430 +++ b/lib/ur/basis.urs Thu Jun 23 08:44:03 2011 -0400 @@ -593,6 +593,7 @@ (** XML *) type css_class +val show_css_class : show css_class val classes : css_class -> css_class -> css_class (* The equivalent of writing one class after the other, separated by a space, in * an HTML 'class' attribute *) diff -r 3bef8d50b4d6 -r d65387bdc557 src/monoize.sml --- a/src/monoize.sml Wed Jun 22 13:58:43 2011 -0430 +++ b/src/monoize.sml Thu Jun 23 08:44:03 2011 -0400 @@ -1202,6 +1202,12 @@ in ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm) end + | L.EFfi ("Basis", "show_css_class") => + let + val s = (L'.TFfi ("Basis", "string"), loc) + in + ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm) + end | L.EFfi ("Basis", "show_char") => ((L'.EFfi ("Basis", "charToString"), loc), fm) | L.EFfi ("Basis", "show_bool") => diff -r 3bef8d50b4d6 -r d65387bdc557 tests/showClass.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/showClass.ur Thu Jun 23 08:44:03 2011 -0400 @@ -0,0 +1,3 @@ +style test + +fun main () : transaction page = return {[test]}