summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-06-23 08:44:03 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-06-23 08:44:03 -0400
commit25f4cc36cfd766a9d5ca7e6572b291c23fd16c5d (patch)
treec8508b1281008d4b1a6229db3720e094b3e1615e
parent7d08ad55454bd7a09315027f6e8bda5ad09de826 (diff)
'show' instance for 'css_class'
-rw-r--r--lib/ur/basis.urs1
-rw-r--r--src/monoize.sml6
-rw-r--r--tests/showClass.ur3
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index c4f5b2aa..8da69c60 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -593,6 +593,7 @@ val setval : sql_sequence -> int -> transaction unit
(** 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 --git a/src/monoize.sml b/src/monoize.sml
index b761f0a5..c0be7583 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -1202,6 +1202,12 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
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 --git a/tests/showClass.ur b/tests/showClass.ur
new file mode 100644
index 00000000..c8a4fb30
--- /dev/null
+++ b/tests/showClass.ur
@@ -0,0 +1,3 @@
+style test
+
+fun main () : transaction page = return <xml>{[test]}</xml>