diff options
author | 2011-10-06 09:50:40 -0400 | |
---|---|---|
committer | 2011-10-06 09:50:40 -0400 | |
commit | deb9c3232c96546f9ecbbf1503fa955689a49dda (patch) | |
tree | 345b651089acf95043a54e3b0fa3fa556579023a | |
parent | b98afb49da59260e2f26f1e9be3e1c0415729355 (diff) |
Basis.null
-rw-r--r-- | lib/ur/basis.urs | 2 | ||||
-rw-r--r-- | src/monoize.sml | 2 | ||||
-rw-r--r-- | tests/cssNull.ur | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 8b0561c8..dc4d9ba2 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -602,6 +602,8 @@ val setval : sql_sequence -> int -> transaction unit type css_class val show_css_class : show css_class +val null : css_class +(* No special formatting *) 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 9f100a3f..f6ea7255 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2855,6 +2855,8 @@ fun monoExp (env, st, fm) (all as (e, loc)) = ((L'.ESetval (e1, e2), loc), fm) end + | L.EFfi ("Basis", "null") => ((L'.EPrim (Prim.String ""), loc), fm) + | L.EFfiApp ("Basis", "classes", [s1, s2]) => let val (s1, fm) = monoExp (env, st, fm) s1 diff --git a/tests/cssNull.ur b/tests/cssNull.ur new file mode 100644 index 00000000..4939c712 --- /dev/null +++ b/tests/cssNull.ur @@ -0,0 +1,6 @@ +style spicy + +fun main () : transaction page = return <xml><body> + <span class={null}>Boring</span> + <span class={classes null spicy}>Spicy!</span> +</body></xml> |